mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-18 11:18:07 -04:00
Formatted code (#1007)
* Updated style * Updated files * fixed new line * Updated spacing * File fix WIP * Updated to clang 13 * updated comment style * Removed old comment code
This commit is contained in:
parent
7aca7ce74d
commit
033c4e9a5b
599 changed files with 70746 additions and 66896 deletions
|
@ -25,22 +25,22 @@
|
|||
namespace cc1101 {
|
||||
|
||||
void CC1101Emu::whitening_init() {
|
||||
whitening_pn = 0x1FF;
|
||||
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;
|
||||
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue