引入mqtt 引入cjson

This commit is contained in:
2584532475@qq.com committed 2023-11-30 08:10:01 +08:00
1 parent a69c1a58d6
commit f8591b8b99
86 files changed
+12141 -2157

No files matched your search

+28 -17
View File
@@ -1,31 +1,42 @@
#ifndef MODBUS_ADDR_H
#ifndef MODBUS_ADDR_H
#define MODBUS_ADDR_H
#include <stdint.h>
#define REG_GOPENH 0X0000
#define REG_GOPENL 0X0001
#define REG_ALOADH 0X0002
#define REG_ALOADL 0X0003
#define REG_BLOADH 0X0004
#define REG_BLOADL 0X0005
#define REG_SOPEN 0X0007
#define REG_SLOPT 0X0008 // 执行闸门动作
typedef struct reg_data_t
{
uint16_t gopen;
uint16_t aload;
uint16_t bload;
uint16_t bl1;
uint16_t bl2;
uint16_t bl3;
uint16_t bl4;
uint16_t sopen;
uint16_t slopt;
} reg_data_t;
typedef enum reg_addr_t
{
reg_gopen = 0X0000, // 2¸ö×Ö
reg_aload = 0X0001,
reg_bload = 0X0002,
reg_bl1 = 0X0003,
reg_bl2 = 0X0004,
reg_bl3 = 0X0005,
reg_bl4 = 0X0006,
reg_sopen = 0X0007,
reg_slopt = 0X0008,
} reg_addr_t;
#define REG_MAX 0X0009
extern reg_data_t reg_data;
#endif
#endif