view modbus

This commit is contained in:
hwq
2025-09-11 18:38:58 +08:00
parent 485e535c4d
commit ffe1456b3a
68 changed files with 6002 additions and 9079 deletions
+4 -2
View File
@@ -2,13 +2,15 @@
#include <rtthread.h>
#include "mb.h"
#include "chrg_mb.h"
#include "chrg_comm.h"
#define LOG_TAG "chrg.comm"
#define DBG_LEVEL DBG_LOG
#include <rtdbg.h>
extern rt_uint16_t usSRegHoldBuf[RT_S_REG_HOLDING_NREGS];
extern rt_uint16_t usSRegHoldBuf[S_REG_HOLDING_NREGS];
struct chrg_comm_t chrgcomm = {
.tid_poll = RT_NULL,
@@ -49,7 +51,7 @@ static void chrg_comm_poll (void *pdata)
return ;
}
eMBInit(MB_RTU, pCOMM->addr, 1, 115200, MB_PAR_EVEN);
eMBInit(pCOMM->addr, 1, 115200, MB_PAR_EVEN);
eMBEnable();