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:
6969
7070###### Handler function
7171
72- handler functions must return void and take:
72+ Handler functions must return unit8_t and take:
7373* uint8_t fc - request function code
7474* uint16_t address - first register / first coil address
7575* uint16_t length / status - length of data / coil status
7676
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+
7792###### Function codes
7893
7994* FC_READ_COILS = 1
You can’t perform that action at this time.
0 commit comments