Costmetic update

This commit is contained in:
Gregory Nutt 2016-01-23 11:18:39 -06:00
parent 91b762aa86
commit 9ece46e917

View File

@ -47,20 +47,27 @@
/************************************************************************************************
* Private Data
*
************************************************************************************************/
/************************************************************************************************
* CRC8 table generated with:
*
* #define POLY 0xB2 // ((uint8_t) 0x14D) ^ 0xFF
*
* printf(" ");
* for (y=0; y<256; y++)
* {
* crc = y;
* for (x=0; x<8; x++)
* crc = (crc & 1) ? POLY ^ (crc >> 1) : crc >> 1;
* for (y = 0; y < 256; y++)
* {
* crc = y;
* for (x = 0; x < 8; x++)
* {
* crc = (crc & 1) ? POLY ^ (crc >> 1) : crc >> 1;
* }
*
* printf("0x%02X, ", crc);
* if ((y & 0x07) == 0x7)
* printf("\n ");
* {
* printf("\n ");
* }
* }
*
************************************************************************************************/
@ -104,6 +111,7 @@ static const uint8_t crc8_tab[256] =
/************************************************************************************************
* Public Functions
************************************************************************************************/
/************************************************************************************************
* Name: crc8part
*
@ -138,4 +146,3 @@ uint8_t crc8(FAR const uint8_t *src, size_t len)
{
return crc8part(src, len, 0);
}