Add embedded storage drivers and extend firmware metadata
This commit is contained in:
15
c/modbus/include/modbus_data.h
Normal file
15
c/modbus/include/modbus_data.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef SET_MODBUS_DATA_H
|
||||
#define SET_MODBUS_DATA_H
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
/* Decoded Modbus values, independent of UART/HAL and register addresses.
|
||||
* Coils in bank use bit 0 first in 16-bit words. Message words contain two
|
||||
* wire bytes, first byte in bits 15..8 (same convention as register messages).
|
||||
* The port validates/maps the complete address range before calling transfer.
|
||||
* Return standard Modbus exceptions: 0 success, 1 function, 3 value. */
|
||||
uint8_t mb_data_validate(uint8_t function, uint16_t quantity, uint16_t byte_count,
|
||||
size_t data_capacity);
|
||||
uint8_t mb_data_transfer(uint8_t function, uint16_t quantity, uint16_t byte_count,
|
||||
uint16_t *bank, uint16_t bit_offset, uint16_t *data,
|
||||
size_t data_capacity, uint16_t *response_bytes);
|
||||
#endif
|
||||
Reference in New Issue
Block a user