|
|
@ -36,7 +36,7 @@ typedef unsigned char BYTE;
|
|
|
|
#define IOT_PARAM_READ 0xAF
|
|
|
|
#define IOT_PARAM_READ 0xAF
|
|
|
|
|
|
|
|
|
|
|
|
#define MAX_SERIAL_DEV_NUM 25 /* 最大接串口传感器数量*/
|
|
|
|
#define MAX_SERIAL_DEV_NUM 25 /* 最大接串口传感器数量*/
|
|
|
|
#define MAX_SERIAL_PORT_NUM 3
|
|
|
|
#define MAX_SERIAL_PORT_NUM 5
|
|
|
|
#define MAX_DEV_VALUE_NUM 12 /* 一台装置最大的采样值数量*/
|
|
|
|
#define MAX_DEV_VALUE_NUM 12 /* 一台装置最大的采样值数量*/
|
|
|
|
|
|
|
|
|
|
|
|
#define WEATHER_PROTOCOL 1 /* 温湿度协议序号*/
|
|
|
|
#define WEATHER_PROTOCOL 1 /* 温湿度协议序号*/
|
|
|
@ -130,7 +130,7 @@ typedef unsigned char BYTE;
|
|
|
|
#define SPEED_DOME_CAMERA 0 /* 球机摄像机*/
|
|
|
|
#define SPEED_DOME_CAMERA 0 /* 球机摄像机*/
|
|
|
|
#define SERIAL_CAMERA 2 /* 串口摄像机a*/
|
|
|
|
#define SERIAL_CAMERA 2 /* 串口摄像机a*/
|
|
|
|
|
|
|
|
|
|
|
|
#define COLLECT_DATA 0 /* 调试使用*/
|
|
|
|
#define COLLECT_DATA 1 /* 调试使用*/
|
|
|
|
|
|
|
|
|
|
|
|
#define LOGE(fmt, args...) __android_log_print(ANDROID_LOG_ERROR, "serial_port_comm", fmt, ##args) /* 红色*/
|
|
|
|
#define LOGE(fmt, args...) __android_log_print(ANDROID_LOG_ERROR, "serial_port_comm", fmt, ##args) /* 红色*/
|
|
|
|
#define LOGI(fmt, args...) __android_log_print(ANDROID_LOG_INFO, "Sensors_Protocol", fmt, ##args) /* 草绿色*/
|
|
|
|
#define LOGI(fmt, args...) __android_log_print(ANDROID_LOG_INFO, "Sensors_Protocol", fmt, ##args) /* 草绿色*/
|
|
|
@ -372,7 +372,7 @@ void Gm_OpenSerialPort(int devidx);
|
|
|
|
|
|
|
|
|
|
|
|
// 关闭串口通讯
|
|
|
|
// 关闭串口通讯
|
|
|
|
void Gm_CloseSerialPort();
|
|
|
|
void Gm_CloseSerialPort();
|
|
|
|
|
|
|
|
int SaveLogTofile(char *szbuf);
|
|
|
|
// 功能说明:串口发送数据 返回实际发送的字节数
|
|
|
|
// 功能说明:串口发送数据 返回实际发送的字节数
|
|
|
|
int GM_SerialComSend(const unsigned char * cSendBuf, unsigned long nSendLen, int commid);
|
|
|
|
int GM_SerialComSend(const unsigned char * cSendBuf, unsigned long nSendLen, int commid);
|
|
|
|
void Gm_InitSerialComm();
|
|
|
|
void Gm_InitSerialComm();
|
|
|
|