wip:
This commit is contained in:
@@ -18,10 +18,39 @@
|
||||
.triac_port = 0}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#define ZH_ZERO_CROSSING_ON \
|
||||
if (_is_zero_crossing == false) \
|
||||
{ \
|
||||
switch (_init_config.triac_port) \
|
||||
{ \
|
||||
case AVR_PORTB: \
|
||||
PORTB &= ~(1 << _init_config.triac_gpio); \
|
||||
break; \
|
||||
case AVR_PORTC: \
|
||||
PORTC &= ~(1 << _init_config.triac_gpio); \
|
||||
case AVR_PORTD: \
|
||||
PORTD &= ~(1 << _init_config.triac_gpio); \
|
||||
break; \
|
||||
default: \
|
||||
break; \
|
||||
} \
|
||||
_is_zero_crossing = true; \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define ZH_ZERO_CROSSING_OFF \
|
||||
if (_is_zero_crossing == true) \
|
||||
{ \
|
||||
_is_zero_crossing = false; \
|
||||
flag = true; \
|
||||
} \
|
||||
break;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
ZH_50HZ = 1,
|
||||
|
||||
Reference in New Issue
Block a user