Added remaining buttons for TouchTunes remote

LCR transmit UI cleanup
CC1101 data whitening function
Uniformized tx progress message handling
This commit is contained in:
furrtek 2017-09-24 20:05:42 +01:00
parent 26949773bb
commit 73d47cd77d
48 changed files with 504 additions and 486 deletions

View file

@ -24,4 +24,23 @@
namespace cc1101 {
void CC1101Emu::whitening_init() {
whitening_pn = 0x1FF;
}
// See TI app note DN509
uint8_t CC1101Emu::whiten_byte(uint8_t byte) {
uint_fast8_t new_bit;
byte ^= (whitening_pn & 0xFF);
for (size_t step = 0; step < 8; step++) {
new_bit = (whitening_pn & 1) ^ ((whitening_pn >> 5) & 1);
whitening_pn >>= 1;
whitening_pn |= (new_bit << 8);
}
return byte;
}
} /* namespace cc1101 */