CRC
Prototype:
uint8_t
ROM_Crc8CCITT(uint8_t ui8Crc,
const uint8_t *pui8Data,
uint32_t ui32Count)
ROM Location:
ROM_APITABLE
is an array of pointers located at
0x0100.0010
.
ROM_SOFTWARETABLE
is an array of pointers located at
ROM_APITABLE[21]
.
ROM_Crc8CCITT
is a function pointer located at
ROM_SOFTWARETABLE[4]
.
Parameters:
ui8Crc
is the starting CRC-8-CCITT value.
pui8Data
is a pointer to the data buffer.
ui32Count
is the number of bytes in the data buffer.
Description:
This function is used to calculate the CRC-8-CCITT of the input buffer. The CRC-8-CCITT is
computed in a running fashion, meaning that the entire data block that is to have its CRC-8-
CCITT computed does not need to be supplied all at once. If the input buffer contains the
entire block of data, then
ui8Crc
should be set to 0. If, however, the entire block of data is not
available, then
ui8Crc
should be set to 0 for the first portion of the data, and then the returned
value should be passed back in as
ui8Crc
for the next portion of the data.
For example, to compute the CRC-8-CCITT of a block that has been split into three pieces, use
the following:
ui8Crc = ROM_Crc8CCITT(0, pui8Data1, ui32Len1);
ui8Crc = ROM_Crc8CCITT(ui8Crc, pui8Data2, ui32Len2);
ui8Crc = ROM_Crc8CCITT(ui8Crc, pui8Data3, ui32Len3);
Computing a CRC-8-CCITT in a running fashion is useful in cases where the data is arriving
via a serial link (for example) and is therefore not all available at one time.
Returns:
The CRC-8-CCITT of the input data.
72
April 8, 2013
Summary of Contents for Tiva TM4C123GH6PM
Page 26: ...Boot Loader 26 April 8 2013...
Page 68: ...Controller Area Network CAN 68 April 8 2013...
Page 122: ...Hibernation Module 122 April 8 2013...
Page 136: ...Inter Integrated Circuit I2C 136 April 8 2013...
Page 152: ...Memory Protection Unit MPU 152 April 8 2013...
Page 174: ...Pulse Width Modulator PWM Returns None 174 April 8 2013...
Page 196: ...Synchronous Serial Interface SSI 196 April 8 2013...
Page 222: ...System Control 222 April 8 2013...
Page 270: ...UART 270 April 8 2013...
Page 296: ...uDMA Controller 296 April 8 2013...
Page 351: ...April 8 2013 351...