|
Modbus Vault v1.0
|
Parser for Modbus. More...
#include "esp_err.h"#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | MODBUS_PARSER_MINIMUM_FRAME_LENGTH (4) |
Functions | |
| esp_err_t | modbus_parser_check_crc (const uint8_t *data_ptr, size_t length) |
| Checks CRC16-Modbus of data validity. | |
Parser for Modbus.
Provides CRC16 check abstraction for Modbus
| #define MODBUS_PARSER_MINIMUM_FRAME_LENGTH (4) |
Minimum Modbus frame: |Address|Function|CRC16_Lo|CRC16_Hi|
| esp_err_t modbus_parser_check_crc | ( | const uint8_t * | data_ptr, |
| size_t | length | ||
| ) |
Checks CRC16-Modbus of data validity.
| data_ptr | Pointer to data |
| length | Data length |
| ESP_OK | CRC OK |
| ESP_ERR_INVALID_ARG | Provided invalid argument(s) |
| ESP_ERR_INVALID_SIZE | Data size invalid |
| ESP_ERR_INVALID_CRC | CRC invalid |