Skip to content

Commit abc4aa0

Browse files
authored
Update README.md
Update readme for v2.0.0 callback functions.
1 parent 5d09fa1 commit abc4aa0

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)