mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2026-10-30 21:44:24 +00:00
Compute xn297 whitening instead of using an hardcoded array (#1201)
* Compute xn297 whitening instead of using an hardcoded array * Add function to scramble byte for XN297 interface * Refactor XN297 scrambling logic to use a global LFSR and improve byte generation * Add technical specification and implementation details for XN297 whitening and CRC
This commit is contained in:
@@ -70,12 +70,14 @@ static void __attribute__((unused)) XN297Dump_RF_init()
|
||||
}
|
||||
}
|
||||
|
||||
extern const uint8_t xn297_scramble[];
|
||||
|
||||
static boolean __attribute__((unused)) XN297Dump_process_packet(void)
|
||||
{
|
||||
uint16_t crcxored;
|
||||
uint8_t packet_sc[XN297DUMP_MAX_PACKET_LEN], packet_un[XN297DUMP_MAX_PACKET_LEN];
|
||||
uint8_t xn297_scramble[XN297DUMP_MAX_PACKET_LEN];
|
||||
xn297_lfsr = XN297_SCRAMBLE_SEED;
|
||||
for (uint8_t i = 0; i < XN297DUMP_MAX_PACKET_LEN; i++)
|
||||
xn297_scramble[i] = XN297_scramble_byte();
|
||||
enhanced=false;
|
||||
// init crc
|
||||
crc = 0xb5d2;
|
||||
|
||||
Reference in New Issue
Block a user