summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAditya Naik2020-02-12 19:46:57 -0500
committerAditya Naik2020-02-12 19:46:57 -0500
commit70c917e4caee129687d18b2788282ff7cd1509e8 (patch)
treecdac12d7dac6a4547a30a35e362117b271587a14 /src
parentdf1563fbea50fbf3bf0f92ae6559dd2d7f2e6b29 (diff)
Comments
Diffstat (limited to 'src')
-rw-r--r--src/modbus.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/modbus.h b/src/modbus.h
index 7f80c4c..a3835fa 100644
--- a/src/modbus.h
+++ b/src/modbus.h
@@ -4,15 +4,17 @@
#include <string.h>
#include <inttypes.h>
+/* Modbus function codes */
#define read_holding_regs 0x03
#define read_input_regs 0x04
#define write_single_reg 0x06
+/* Helpful macros */
#define lowByte(w) ((uint8_t) ((w) & 0xff))
#define highByte(w) ((uint8_t) ((w) >> 8))
#define word(h, l) ((h << 8) | l)
-/* #define MODBUS_TIMEOUT 50 */
+/* Maximum response buffer size for Modbus nodes */
#define MAX_BUFSIZE 64
typedef struct {