40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
|
/***
|
||
|
* @Author: mbw
|
||
|
* @Date: 2024-11-01 11:03:06
|
||
|
* @LastEditors: mbw && 1600520629@qq.com
|
||
|
* @LastEditTime: 2024-12-26 11:18:19
|
||
|
* @FilePath: \JT-DT-YD4N02A_RTT_MRS-4G\bsp\inc\bsp_emv.h
|
||
|
* @Description:
|
||
|
* @
|
||
|
* @Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
|
||
|
*/
|
||
|
/***
|
||
|
* @Author: mbw
|
||
|
* @Date: 2024-11-01 11:03:06
|
||
|
* @LastEditors: mbw && 1600520629@qq.com
|
||
|
* @LastEditTime: 2024-12-12 15:24:02
|
||
|
* @FilePath: \JT-DT-YD4N02A_RTT_MRS-4G\bsp\inc\bsp_emv.h
|
||
|
* @Description:
|
||
|
* @
|
||
|
* @Copyright (c) 2024 by ${git_name_email}, All Rights Reserved.
|
||
|
*/
|
||
|
#ifndef __BSP_EMV__
|
||
|
#define __BSP_EMV__
|
||
|
|
||
|
#include "board.h"
|
||
|
#include "drv_gpio.h"
|
||
|
|
||
|
#define EMV_PIN GET_PIN(B, 0)
|
||
|
|
||
|
// 保持不动
|
||
|
#define EMV_ON rt_pin_write(EMV_PIN, PIN_LOW)
|
||
|
// 高电平 关闭电磁阀
|
||
|
#define EMV_OFF rt_pin_write(EMV_PIN, PIN_HIGH)
|
||
|
|
||
|
#define EMV_CLOSE_VALVE do {rt_pin_write(EMV_PIN, PIN_HIGH);rt_thread_mdelay(RT_TICK_PER_SECOND / 2);rt_pin_write(EMV_PIN, PIN_LOW);} while (0)
|
||
|
|
||
|
extern volatile rt_uint16_t emv_state_flag;
|
||
|
int BSP_Set_Emv_Status(rt_bool_t status);
|
||
|
int BSP_EMV_Init(void);
|
||
|
#endif // !__BSP_EMV__
|