Add embedded storage drivers and extend firmware metadata

This commit is contained in:
2026-09-27 01:44:59 +03:00
parent 795a1279b1
commit 2ad29e7ffd
52 changed files with 5801 additions and 3 deletions

View 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