JT-DT-YD4N02B_4G_RTT_MRS/bsp/inc/bsp_relay.h

23 lines
481 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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__