![]() |
![]() |
#include "driverlib/5xx_6xx/crc.h"
#include "inc/hw_types.h"
#include "deprecated/CCS/msp430xgeneric.h"
#include "driverlib/5xx_6xx/debug.h"
Functions | |
void | CRC_setSeed (unsigned int baseAddress, unsigned int seed) |
void | CRC_setData (unsigned int baseAddress, unsigned int dataIn) |
void | CRC_setDataByteBitsReversed (unsigned int baseAddress, unsigned int dataIn) |
unsigned int | CRC_getData (unsigned int baseAddress) |
unsigned int | CRC_getResult (unsigned int baseAddress) |
unsigned int | CRC_getResultBitsReversed (unsigned int baseAddress) |
void CRC_setSeed | ( | unsigned int | baseAddress, |
unsigned int | seed | ||
) |
Sets the seed for the CRC.
baseAddress | is the base address of the CRC module. |
seed | is the seed for the CRC to start generating a signature from. Modified bits are CRCINIRES of CRCINIRES register. |
This function sets the seed for the CRC to begin generating a signature with the given seed and all passed data. Using this funtion resets the CRC signature.
References HWREG.
void CRC_setData | ( | unsigned int | baseAddress, |
unsigned int | dataIn | ||
) |
Sets the data to add into the CRC module to generate a new signature.
baseAddress | is the base address of the CRC module. |
dataIn | is the data to be added, through the CRC module, to the signature. Modified bits are CRCDI of CRCDI register. |
This function sets the given data into the CRC module to generate the new signature from the current signature and new data.
References HWREG.
void CRC_setDataByteBitsReversed | ( | unsigned int | baseAddress, |
unsigned int | dataIn | ||
) |
Translates the data by reversing the bits in each byte and then sets this data to add into the CRC module to generate a new signature.
baseAddress | is the base address of the CRC module. |
dataIn | is the data to be added, through the CRC module, to the signature. Modified bits are CRCDIRB of CRCDIRB register. |
This function first reverses the bits in each byte of the data and then generates the new signature from the current signature and new translated data.
References HWREG.
unsigned int CRC_getData | ( | unsigned int | baseAddress | ) |
Returns the value currently in the Data register.
baseAddress | is the base address of the CRC module. |
This function returns the value currently in the data register. If set in byte bits reversed format, then the translated data would be returned.
References HWREG.
unsigned int CRC_getResult | ( | unsigned int | baseAddress | ) |
Returns the value pf the Signature Result.
baseAddress | is the base address of the CRC module. |
This function returns the value of the signature result generated by the CRC.
References HWREG.
unsigned int CRC_getResultBitsReversed | ( | unsigned int | baseAddress | ) |
Returns the bit-wise reversed format of the Signature Result.
baseAddress | is the base address of the CRC module. |
This function returns the bit-wise reversed format of the Signature Result.
References HWREG.