You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resolved with the following function...
and obviously the creation of WordData in the struct.
uint8_t Talkie::getBits(uint8_t bits) {
uint8_t value = 0;
for (; bits; WordDataBit--, WordData >>= 1, bits--) {
value <<= 1; // NULL on first pass
if (!WordDataBit) { // regular byte rollover junk...
WordData = pgm_read_byte(WordDataPointer);
WordDataPointer++;
WordDataBit = 8;
}
value |= (WordData & 0x01); // OR a 1 into value if the MSB of WordData is set
}
return value;
}
The text was updated successfully, but these errors were encountered:
resolved with the following function...
and obviously the creation of WordData in the struct.
uint8_t Talkie::getBits(uint8_t bits) {
uint8_t value = 0;
for (; bits; WordDataBit--, WordData >>= 1, bits--) {
value <<= 1; // NULL on first pass
if (!WordDataBit) { // regular byte rollover junk...
WordData = pgm_read_byte(WordDataPointer);
WordDataPointer++;
WordDataBit = 8;
}
value |= (WordData & 0x01); // OR a 1 into value if the MSB of WordData is set
}
return value;
}
The text was updated successfully, but these errors were encountered: