CHG: extracted a #define for the crc16 poly

This commit is contained in:
iceman1001 2016-02-12 12:34:54 +01:00
commit 6b6815bccb
2 changed files with 7 additions and 7 deletions

View file

@ -135,8 +135,7 @@ uint32_t bytebits_to_byte(uint8_t *src, size_t numbits)
uint32_t bytebits_to_byteLSBF(uint8_t *src, size_t numbits)
{
uint32_t num = 0;
for(int i = 0 ; i < numbits ; i++)
{
for(int i = 0 ; i < numbits ; i++) {
num = (num << 1) | *(src + (numbits-(i+1)));
}
return num;