2025-03-04 10:04:30 +00:00
|
|
|
|
#ifndef APP_UART_PARSE_
|
|
|
|
|
#define APP_UART_PARSE_
|
|
|
|
|
|
|
|
|
|
#include "uart_dev.h"
|
|
|
|
|
|
2025-03-05 08:27:39 +00:00
|
|
|
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
typedef enum {
|
|
|
|
|
SL_Function_Code_Read_Register = 0x30, /* <20><><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
SL_Function_Code_Write_Register = 0x10, /* д<>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|
|
|
|
SL_Function_Code_Distribution_Profile = 0xD0, /* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>·<EFBFBD> */
|
|
|
|
|
SL_Function_Code_Read_Profile = 0xD1, /* <20><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>ȡ */
|
|
|
|
|
}SL_MsgFunctionCode;
|
|
|
|
|
|
|
|
|
|
/* <20>Ĵ<EFBFBD><C4B4><EFBFBD><EFBFBD><EFBFBD>ַ */
|
|
|
|
|
typedef enum {
|
|
|
|
|
GW_Register_WorkCurrent = 0x0000,
|
|
|
|
|
GW_Register_WorkVoltage = 0x0001,
|
|
|
|
|
GW_Register_Temperature = 0x0002,
|
|
|
|
|
GW_Register_Port1_Power = 0x0003,
|
|
|
|
|
GW_Register_Port2_Power = 0x0004,
|
|
|
|
|
GW_Register_Port3_Power = 0x0005,
|
|
|
|
|
GW_Register_Port4_Power = 0x0006,
|
|
|
|
|
GW_Register_Port5_Power = 0x0007,
|
|
|
|
|
GW_Register_Port6_Power = 0x0008,
|
|
|
|
|
GW_Register_Port7_Power = 0x0009,
|
|
|
|
|
GW_Register_Port8_Power = 0x000A,
|
|
|
|
|
GW_Register_Port9_Power = 0x000B,
|
|
|
|
|
}SL_GateWay_MsgRegister;
|
|
|
|
|
|
2025-03-04 10:04:30 +00:00
|
|
|
|
uint16_t checkModebusCrc(uint8_t *arr_buff, uint8_t len);
|
|
|
|
|
void upwardUartDataAnalysis(device_handle device);
|
|
|
|
|
|
|
|
|
|
#endif
|