view modbus
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user