Functions
crc.c File Reference
#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)

Function Documentation

void CRC_setSeed ( unsigned int  baseAddress,
unsigned int  seed 
)

Sets the seed for the CRC.

Parameters:
baseAddressis the base address of the CRC module.
seedis 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.

Returns:
NONE

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.

Parameters:
baseAddressis the base address of the CRC module.
dataInis 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.

Returns:
NONE

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.

Parameters:
baseAddressis the base address of the CRC module.
dataInis 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.

Returns:
NONE

References HWREG.

unsigned int CRC_getData ( unsigned int  baseAddress)

Returns the value currently in the Data register.

Parameters:
baseAddressis 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.

Returns:
NONE

References HWREG.

unsigned int CRC_getResult ( unsigned int  baseAddress)

Returns the value pf the Signature Result.

Parameters:
baseAddressis the base address of the CRC module.

This function returns the value of the signature result generated by the CRC.

Returns:
NONE

References HWREG.

unsigned int CRC_getResultBitsReversed ( unsigned int  baseAddress)

Returns the bit-wise reversed format of the Signature Result.

Parameters:
baseAddressis the base address of the CRC module.

This function returns the bit-wise reversed format of the Signature Result.

Returns:
NONE

References HWREG.


Copyright 2012, Texas Instruments Incorporated