54 lines
910 B
C
54 lines
910 B
C
#ifndef __BSP_ML307R_H__
|
|
#define __BSP_ML307R_H__
|
|
|
|
|
|
#include "CH58x_common.h"
|
|
|
|
/*4G 模块控制引脚*/
|
|
#define ENABLE_3_8_V GPIO_Pin_3 //PB3
|
|
|
|
#define USIM_DECT_PIN GPIO_Pin_5 //PB5
|
|
#define ML307_PWR_PIN GPIO_Pin_6 //PB6
|
|
#define ML307_RST_PIN GPIO_Pin_7 //PB7
|
|
|
|
#define ML307_UART_TX_PIN GPIO_Pin_13 //PB13
|
|
#define ML307_UART_RX_PIN GPIO_Pin_12 //PB12
|
|
|
|
typedef enum
|
|
{
|
|
kHeartbeatStatus, // 定时心跳状态
|
|
kConcentrationHighStatus, // 浓度异常状态
|
|
kSelfCheckStatus, // 自检触发状态
|
|
kAlarmStatus, // 报警触发状态
|
|
kAlarmClearedStatus, // 报警解除状态
|
|
kSensorFaultStatus, // 传感器故障触发状态
|
|
kSensorRecoveredStatus, // 传感器故障解除状态
|
|
kPowerDownStatus, // 掉电状态
|
|
} Mb26Status; // 当前所处的上报状态
|
|
|
|
|
|
void BSP_Ml307r_Init(void);
|
|
void Ml307r_Loop(void);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif //!@__BSP_ML307R_H__
|
|
|
|
|
|
|
|
|