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:
@@ -20,6 +20,9 @@
|
||||
#define XN297_250K true
|
||||
#define XN297_NRF false
|
||||
#define XN297_CC2500 true
|
||||
#define XN297_SCRAMBLE_SEED 0xE3B14BE0 // whitening x^7 + x^3 + 1, seed 0x71: first 28 bits
|
||||
|
||||
extern uint32_t xn297_lfsr;
|
||||
|
||||
//////////////
|
||||
// Functions
|
||||
@@ -41,7 +44,10 @@ static void __attribute__((unused)) XN297_RFChannel(uint8_t);
|
||||
static void __attribute__((unused)) XN297_SetPower();
|
||||
static void __attribute__((unused)) XN297_SetFreqOffset();
|
||||
static bool __attribute__((unused)) XN297_IsPacketSent();
|
||||
static uint8_t __attribute__((unused)) XN297_scramble_byte();
|
||||
#ifdef XN297DUMP_NRF24L01_INO
|
||||
static uint16_t __attribute__((unused)) XN297_crc_xorout(bool, uint16_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user