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

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

#include "pec.h"
#include <stdbool.h>
#include <stdint.h>

Functions

uint16_t adbms_pec_get_pec15 (uint8_t len, const uint8_t *data)
 CRC15 Pec Calculation Function.
 
uint16_t adbms_pec_get_pec10 (bool bIsRxCmd, uint8_t nLength, const uint8_t *pDataBuf)
 

Detailed Description

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

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

Function Documentation

◆ adbms_pec_get_pec15()

uint16_t adbms_pec_get_pec15 ( uint8_t len,
const uint8_t * data )

CRC15 Pec Calculation Function.

Function: Pec15_Calc

This function calculates and return the CRC15 value

Parameters:

Parameters
[in]LenNumber of bytes that will be used to calculate a PEC
[in]*dataArray of data that will be used to calculate a PEC
Returns
CRC15_Value