Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Update readme for v2.0.0 callback functions.
  • Loading branch information
yaacov authored Nov 14, 2017
1 parent 5d09fa1 commit abc4aa0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,26 @@ The callback vector has 4 slots for request handlers:
###### Handler function
handler functions must return void and take:
Handler functions must return unit8_t and take:
* uint8_t fc - request function code
* uint16_t address - first register / first coil address
* uint16_t length / status - length of data / coil status
Return codes:
* STATUS_OK = 0,
* STATUS_ILLEGAL_FUNCTION,
* STATUS_ILLEGAL_DATA_ADDRESS,
* STATUS_ILLEGAL_DATA_VALUE,
* STATUS_SLAVE_DEVICE_FAILURE,
* STATUS_ACKNOWLEDGE,
* STATUS_SLAVE_DEVICE_BUSY,
* STATUS_NEGATIVE_ACKNOWLEDGE,
* STATUS_MEMORY_PARITY_ERROR,
* STATUS_GATEWAY_PATH_UNAVAILABLE,
* STATUS_GATEWAY_TARGET_DEVICE_FAILED_TO_RESPOND
###### Function codes
* FC_READ_COILS = 1
Expand Down

0 comments on commit abc4aa0

Please sign in to comment.