Revert "fix: changed trigger level"

This reverts commit 6d69f5a42e.
This commit is contained in:
2025-10-10 11:00:43 +03:00
parent 6d69f5a42e
commit 832829368c
2 changed files with 4 additions and 4 deletions

View File

@@ -52,19 +52,19 @@ void zh_avr_ac_dimmer_isr_handler(void)
switch (_init_config.zero_cross_port)
{
case AVR_PORTB:
if ((PINB & _init_config.zero_cross_gpio) == _init_config.zero_cross_gpio)
if ((PINB & (1 << _init_config.zero_cross_gpio)) == 0)
{
flag = true;
}
break;
case AVR_PORTC:
if ((PINC & _init_config.zero_cross_gpio) == _init_config.zero_cross_gpio)
if ((PINC & (1 << _init_config.zero_cross_gpio)) == 0)
{
flag = true;
}
break;
case AVR_PORTD:
if ((PIND & _init_config.zero_cross_gpio) == _init_config.zero_cross_gpio)
if ((PIND & (1 << _init_config.zero_cross_gpio)) == 0)
{
flag = true;
}