Costmetic update
This commit is contained in:
parent
91b762aa86
commit
9ece46e917
@ -47,7 +47,9 @@
|
|||||||
|
|
||||||
/************************************************************************************************
|
/************************************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
*
|
************************************************************************************************/
|
||||||
|
|
||||||
|
/************************************************************************************************
|
||||||
* CRC8 table generated with:
|
* CRC8 table generated with:
|
||||||
*
|
*
|
||||||
* #define POLY 0xB2 // ((uint8_t) 0x14D) ^ 0xFF
|
* #define POLY 0xB2 // ((uint8_t) 0x14D) ^ 0xFF
|
||||||
@ -57,11 +59,16 @@
|
|||||||
* {
|
* {
|
||||||
* crc = y;
|
* crc = y;
|
||||||
* for (x = 0; x < 8; x++)
|
* for (x = 0; x < 8; x++)
|
||||||
|
* {
|
||||||
* crc = (crc & 1) ? POLY ^ (crc >> 1) : crc >> 1;
|
* crc = (crc & 1) ? POLY ^ (crc >> 1) : crc >> 1;
|
||||||
|
* }
|
||||||
|
*
|
||||||
* printf("0x%02X, ", crc);
|
* printf("0x%02X, ", crc);
|
||||||
* if ((y & 0x07) == 0x7)
|
* if ((y & 0x07) == 0x7)
|
||||||
|
* {
|
||||||
* printf("\n ");
|
* printf("\n ");
|
||||||
* }
|
* }
|
||||||
|
* }
|
||||||
*
|
*
|
||||||
************************************************************************************************/
|
************************************************************************************************/
|
||||||
|
|
||||||
@ -104,6 +111,7 @@ static const uint8_t crc8_tab[256] =
|
|||||||
/************************************************************************************************
|
/************************************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
************************************************************************************************/
|
************************************************************************************************/
|
||||||
|
|
||||||
/************************************************************************************************
|
/************************************************************************************************
|
||||||
* Name: crc8part
|
* Name: crc8part
|
||||||
*
|
*
|
||||||
@ -138,4 +146,3 @@ uint8_t crc8(FAR const uint8_t *src, size_t len)
|
|||||||
{
|
{
|
||||||
return crc8part(src, len, 0);
|
return crc8part(src, len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user