From 952f3c03ac2b24eb4804cb336c5a684903252da1 Mon Sep 17 00:00:00 2001 From: jaseg Date: Tue, 15 Aug 2017 10:34:57 +0200 Subject: Temporary for bit shuffling --- fw/main.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/fw/main.c b/fw/main.c index 3c10696..cdde804 100644 --- a/fw/main.c +++ b/fw/main.c @@ -83,17 +83,11 @@ void transpose_data(volatile uint8_t *rx_buf, volatile struct framebuf *out_fb) }; }; struct data_format *rxp = (struct data_format *)rx_buf; - for (unsigned int digit=0; digitdata; - for (int bit=0x80; bit; bit>>=1, outp+=frame_size_words) - outp[segment] |= !!(rxp->high[segment] & bit) << digit; - } - uint16_t low = rxp->low; - for (int segment=0; segment<8; segment++) { - uint32_t *outp = out_fb->data; - for (int bit=0x8000; bit; bit>>=1, outp+=frame_size_words) - outp[segment] |= !!(rxp->high[segment] & bit) << digit; + for (int bit=0; bit<8; bit++) { + for (int seg=0; seg<8; seg++) { + for (int digit=0; digit<32; digit++) { + out_fb[(bit+2)*frame_size_words + seg] |= !!(rxp[digit].high[seg] & (1<