aboutsummaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBen Hilburn <ben.hilburn@ettus.com>2014-07-17 18:19:35 -0700
committerBen Hilburn <ben.hilburn@ettus.com>2014-07-17 18:19:35 -0700
commit5e4a8398232c9f23ae8c8bbdba163e7092f2a440 (patch)
treef386aeb8a8d009e284dd7fd1c0217aa0cafb7dcf /firmware
parent4f21de2bcc99a92d4eff4c8ac8057c5921be68e8 (diff)
parentd2be9455d61981e465e3bab748f9a9a500c97925 (diff)
downloaduhd-5e4a8398232c9f23ae8c8bbdba163e7092f2a440.tar.gz
uhd-5e4a8398232c9f23ae8c8bbdba163e7092f2a440.tar.bz2
uhd-5e4a8398232c9f23ae8c8bbdba163e7092f2a440.zip
Merge remote-tracking branch 'origin/maint'
Diffstat (limited to 'firmware')
-rw-r--r--firmware/x300/x300/x300_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/x300/x300/x300_main.c b/firmware/x300/x300/x300_main.c
index d7fd32ac3..d865e1d09 100644
--- a/firmware/x300/x300/x300_main.c
+++ b/firmware/x300/x300/x300_main.c
@@ -1,4 +1,4 @@
-// Copyright 2013 Ettus Research LLC
+// Copyright 2013-2014 Ettus Research LLC
#include "x300_init.h"
#include "x300_defs.h"
@@ -345,12 +345,12 @@ static void handle_uarts(void)
static uint32_t rxoffset = 0;
for (int rxch = wb_uart_getc(UART0_BASE); rxch != -1; rxch = wb_uart_getc(UART0_BASE))
{
- rxoffset = (rxoffset+1) % (NUM_POOL_WORDS32*4);
+ rxoffset++;
const int shift = ((rxoffset%4) * 8);
static uint32_t rxword32 = 0;
if (shift == 0) rxword32 = 0;
- rxword32 |= ((uint32_t) rxch) << ((rxoffset%4) * 8);
- rxpool[rxoffset/4] = rxword32;
+ rxword32 |= ((uint32_t) rxch & 0xFF) << shift;
+ rxpool[(rxoffset/4) % NUM_POOL_WORDS32] = rxword32;
shmem[X300_FW_SHMEM_UART_RX_INDEX] = rxoffset;
}