34 lines
802 B
C
34 lines
802 B
C
/******************************************************************************
|
||
* @file app_zc.h
|
||
* @brief 过零业务:装配 bsp_zc,20ms 节拍判 100ms 超时
|
||
* @author cyWu <1917507415@qq.com>
|
||
* @date 2026.09.04
|
||
* @version V1.1.0
|
||
******************************************************************************/
|
||
|
||
#ifndef __APP_ZC_H__
|
||
#define __APP_ZC_H__
|
||
|
||
#include <stdint.h>
|
||
|
||
/**
|
||
* @brief 初始化过零业务(挂继电器沿回调)
|
||
* @return 无
|
||
*/
|
||
void app_zc_init(void);
|
||
|
||
/**
|
||
* @brief 20ms 节拍,只判超时,不扫沿
|
||
* @param dt 距上次调用的毫秒数
|
||
* @return 无
|
||
*/
|
||
void app_zc_poll(uint16_t dt);
|
||
|
||
/**
|
||
* @brief 取走一次超时事件
|
||
* @return 0=无 1=开放弃 2=关强断
|
||
*/
|
||
uint8_t app_zc_consume_timeout(void);
|
||
|
||
#endif /* __APP_ZC_H__ */
|