PER Firmware
Loading...
Searching...
No Matches
pec.h File Reference

Calculation of PEC (CRC15, CRC10) for ADBMS communication. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for pec.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint16_t PEC_calc_pec15 (const uint8_t *data, uint8_t len)
 CRC15 Pec Calculation Function.
 
uint16_t PEC_calc_pec10 (const uint8_t *data_buf, size_t length, bool is_rx_cmd)
 

Detailed Description

Calculation of PEC (CRC15, CRC10) for ADBMS communication.

Author
Analog Devices
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
Millan Kumar (kumar.nosp@m.798@.nosp@m.purdu.nosp@m.e.ed.nosp@m.u)

Function Documentation

◆ PEC_calc_pec10()

uint16_t PEC_calc_pec10 ( const uint8_t * data_buf,
size_t length,
bool is_rx_cmd )
Here is the caller graph for this function:

◆ PEC_calc_pec15()

uint16_t PEC_calc_pec15 ( const uint8_t * data,
uint8_t len )

CRC15 Pec Calculation Function.

Function: PEC_calc_pec15

This function calculates and return the CRC15 value

Parameters:

Parameters
[in]*dataArray of data that will be used to calculate a PEC
[in]lenNumber of bytes that will be used to calculate a PEC
Returns
CRC15_Value
Here is the caller graph for this function: