Modbus Vault v1.0
Loading...
Searching...
No Matches
utils.c File Reference

Implementation of the Utility. More...

#include "utils.h"
#include "esp_timer.h"
Include dependency graph for utils.c:

Functions

uint16_t calculate_modbus_crc16 (const uint8_t *data_ptr, uint32_t length)
 Calculate Modbus CRC16.
 

Detailed Description

Implementation of the Utility.

Author
Abanoub Salah
  • CRC16-Modbus calculation using either of
    • LUT: For performance optimization
    • Arithmetic: For memory optimization

Function Documentation

◆ calculate_modbus_crc16()

uint16_t calculate_modbus_crc16 ( const uint8_t *  data_ptr,
uint32_t  length 
)

Calculate Modbus CRC16.

Parameters
data_ptrPointer to data
lengthData length
Returns
uint16_t CRC16 for provided data
Note
  • Can be configured using kconfig to choose between
    • Look Up Table (LUT)
    • Arithmetic calculation
Here is the caller graph for this function: