#ifndef _BSP_RELAY_H_
#define _BSP_RELAY_H_

#include "main.h"

#define BSP_RELAY_CH_NUM                    (4)

#define BSP_RELAY_CH_LEAKAGE                (0)/*漏液通道*/
#define BSP_RELAY_CH_OPEN                   (1)/*断带*/
#define BSP_RELAY_CH_COMMINCAION            (2)/*通讯异常*/
#define BSP_RELAY_CH_ERROR_STATE            (3)/*状态异常报警*/

typedef struct
{
    u8 state[BSP_RELAY_CH_NUM];
    void (*init)(void);
    void (*task)(void);
    void (*set)(u8 ,u8 );
}bsp_relay_t;

extern bsp_relay_t relay;

#endif
