Begin M17 support.

This commit is contained in:
Jonathan Naylor 2020-10-14 10:52:30 +01:00
parent 2509ab5ba1
commit a62fd814ae
15 changed files with 930 additions and 13 deletions

View file

@ -30,6 +30,15 @@ uint8_t countBits8(uint8_t bits)
return BITS_TABLE[bits];
}
uint8_t countBits16(uint16_t bits)
{
uint8_t* p = (uint8_t*)&bits;
uint8_t n = 0U;
n += BITS_TABLE[p[0U]];
n += BITS_TABLE[p[1U]];
return n;
}
uint8_t countBits32(uint32_t bits)
{
uint8_t* p = (uint8_t*)&bits;