Defines | Functions
crc.h File Reference

Go to the source code of this file.

Defines

#define __MSP430_HAS_CRC__

Functions

void CRC_setSeed (unsigned int baseAddress, unsigned int seed)
void CRC_setData (unsigned int baseAddress, unsigned int signature)
void CRC_setSignatureByteReversed (unsigned int baseAddress, unsigned int signature)
unsigned int CRC_getSignature (unsigned int baseAddress)
unsigned int CRC_getResult (unsigned int baseAddress)
unsigned int CRC_getResultBitReversed (unsigned int baseAddress)

Define Documentation

#define __MSP430_HAS_CRC__

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_setSignatureByteReversed ( unsigned int  baseAddress,
unsigned int  signature 
)
unsigned int CRC_getSignature ( unsigned int  baseAddress)
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_getResultBitReversed ( unsigned int  baseAddress)

Copyright 2012, Texas Instruments Incorporated