diff options
author | Philip Balister <philip@opensdr.com> | 2010-05-28 11:26:40 +0000 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-06-13 19:24:15 +0000 |
commit | 8869208ea8d8dfdd5fe86adc1637b93c4b390c0c (patch) | |
tree | a4346650facae73a1ad3755e609e4c31c44273df /host/apps/omap_debug/usrp-e-crc-rw.c | |
parent | 71783634c4394e739bbc13a9bb3df7d6ab75c147 (diff) | |
download | uhd-8869208ea8d8dfdd5fe86adc1637b93c4b390c0c.tar.gz uhd-8869208ea8d8dfdd5fe86adc1637b93c4b390c0c.tar.bz2 uhd-8869208ea8d8dfdd5fe86adc1637b93c4b390c0c.zip |
Update usrp_e.h file. Change programs to use struct element status instead of flags.
Diffstat (limited to 'host/apps/omap_debug/usrp-e-crc-rw.c')
-rw-r--r-- | host/apps/omap_debug/usrp-e-crc-rw.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/host/apps/omap_debug/usrp-e-crc-rw.c b/host/apps/omap_debug/usrp-e-crc-rw.c index 8883366ae..c3ae45cc1 100644 --- a/host/apps/omap_debug/usrp-e-crc-rw.c +++ b/host/apps/omap_debug/usrp-e-crc-rw.c @@ -81,13 +81,20 @@ static void *read_thread(void *threadid) } #endif - if (rx_data->flags & RB_OVERRUN) + if (rx_data->status & RB_OVERRUN) printf("O"); - + + printf("rx_data->len = %d\n", rx_data->len); + + crc = 0xFFFFFFFF; - for (i = 0; i < rx_data->len - 4; i++) { + for (i = 0; i < rx_data->len - 4; i+=2) { + crc = ((crc >> 8) & 0x00FFFFFF) ^ + crc_tab[(crc ^ rx_data->buf[i+1]) & 0xFF]; +printf("idx = %d, data = %X, crc = %X\n", i, rx_data->buf[i+1],crc); crc = ((crc >> 8) & 0x00FFFFFF) ^ crc_tab[(crc ^ rx_data->buf[i]) & 0xFF]; +printf("idx = %d, data = %X, crc = %X\n", i, rx_data->buf[i],crc); } p = &rx_data->buf[rx_data->len - 4]; @@ -96,7 +103,7 @@ static void *read_thread(void *threadid) #if 1 printf("rx_data->len = %d\n", rx_data->len); - printf("rx_data->flags = %d\n", rx_data->flags); + printf("rx_data->status = %d\n", rx_data->status); for (i = 0; i < rx_data->len; i++) printf("idx = %d, data = %X\n", i, rx_data->buf[i]); printf("calc crc = %lX, rx crc = %X\n", crc, rx_crc); |