g0b1vetx-board/Comm/modbusaddr.h
2023-11-30 08:10:01 +08:00

43 lines
539 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef MODBUS_ADDR_H
#define MODBUS_ADDR_H
#include <stdint.h>
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;
extern reg_data_t reg_data;
#endif