File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,26 @@ The callback vector has 4 slots for request handlers:
69
69
70
70
###### Handler function
71
71
72
- handler functions must return void and take:
72
+ Handler functions must return unit8_t and take:
73
73
* uint8_t fc - request function code
74
74
* uint16_t address - first register / first coil address
75
75
* uint16_t length / status - length of data / coil status
76
76
77
+ Return codes:
78
+
79
+ * STATUS_OK = 0,
80
+ * STATUS_ILLEGAL_FUNCTION,
81
+ * STATUS_ILLEGAL_DATA_ADDRESS,
82
+ * STATUS_ILLEGAL_DATA_VALUE,
83
+ * STATUS_SLAVE_DEVICE_FAILURE,
84
+ * STATUS_ACKNOWLEDGE,
85
+ * STATUS_SLAVE_DEVICE_BUSY,
86
+ * STATUS_NEGATIVE_ACKNOWLEDGE,
87
+ * STATUS_MEMORY_PARITY_ERROR,
88
+ * STATUS_GATEWAY_PATH_UNAVAILABLE,
89
+ * STATUS_GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND
90
+
91
+
77
92
###### Function codes
78
93
79
94
* FC_READ_COILS = 1
You can’t perform that action at this time.
0 commit comments