23 lines
481 B
C
23 lines
481 B
C
#ifndef __BSP_RELAY_H__
|
||
#define __BSP_RELAY_H__
|
||
|
||
#include "board.h"
|
||
#include "drv_gpio.h"
|
||
|
||
#define TEST_BSP_RELAY
|
||
|
||
#define RELAY_PIN GET_PIN(C, 4)
|
||
|
||
// 默认继电器为断开状态
|
||
#define RELAY_OFF rt_pin_write(RELAY_PIN, PIN_LOW)
|
||
|
||
// 高电平 关闭继电器,NO COM导通
|
||
#define RELAY_ON rt_pin_write(RELAY_PIN, PIN_HIGH)
|
||
|
||
extern volatile rt_uint8_t relay_state_flag;
|
||
|
||
int BSP_Set_Relay_Status(rt_bool_t status);
|
||
|
||
int BSP_RELAY_Init(void);
|
||
#endif // !__BSP_RELAY_H__
|