/*
 * peps_util.h
 *
 *  Created on: 2020Äê12ÔÂ6ÈÕ
 *      Author: nxa16228
 */

#ifndef PEPS_DRV_PEPS_UTIL_H_
#define PEPS_DRV_PEPS_UTIL_H_

#include "stdint.h"

#define CENDRIC_SPI_LOG_ENABLE 0

bool cenVerifySpiCrc(const uint8_t *data, uint8_t len);
void cenGenerateSpiCrc(uint8_t *data, uint8_t len);
bool cenVerifyCrcForPkeData(const uint8_t *data, uint8_t len);
void cenGeneratePkeCrc(uint8_t *pkeFrame, uint8_t len);
uint8_t cenGenerateHTPro2Crc(uint8_t * buf, uint8_t len, uint16_t seed);
uint16_t cenGenerateRandom(void);
void cenLogSpiTxRx(void);

float NXPFloat24_to_IEEEFloat( uint8_t * pu8_Float24 );

#endif /* PEPS_DRV_PEPS_UTIL_H_ */
