Transmission works including sync and whitening

This commit is contained in:
jaseg 2023-10-02 14:50:03 +02:00
parent 72cffd586a
commit 8e42ca0978
5 changed files with 41 additions and 8 deletions

View file

@ -15,7 +15,7 @@ static void set_status_leds(uint32_t leds);
static void dma_tx_constant(size_t table_size, uint16_t constant);
static void dma_tx_waveform(size_t table_size, const uint16_t *table);
#define SYNC_INTERVAL 2
#define SYNC_INTERVAL 13
static size_t time_to_sync = 0;
static size_t tx_bitpos = 0;
@ -282,7 +282,7 @@ void DMA1_Channel1_IRQHandler() {
} else {
uint8_t b = tx_buf_read->bytes[tx_sympos];
packet_rng_state = xorshift32(packet_rng_state);
//b ^= packet_rng_state; FIXME DEBUG
b ^= packet_rng_state;
current_symbol = xfr_8b10b_encode(&encoder_state_8b10b, b);
sym_arr[sym_pos] = current_symbol;
tx_sympos ++;