aboutsummaryrefslogtreecommitdiffstats
path: root/host/apps
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-09-21 13:33:51 +0000
committerroot <root@usrp-embedded.lan>2010-09-21 15:06:00 +0000
commitd4a80a2b93a13dc371ef100df962ba99c53a9bb9 (patch)
tree41f2d75c571e0e5b81eb5edb2a2f0f896b058f71 /host/apps
parent7888b861d51fc612abe4c28a2f05c83df7ec1cb1 (diff)
downloaduhd-d4a80a2b93a13dc371ef100df962ba99c53a9bb9.tar.gz
uhd-d4a80a2b93a13dc371ef100df962ba99c53a9bb9.tar.bz2
uhd-d4a80a2b93a13dc371ef100df962ba99c53a9bb9.zip
Fix ring buffer size calculation.
Diffstat (limited to 'host/apps')
-rw-r--r--host/apps/omap_debug/usrp-e-mm-loopback.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/apps/omap_debug/usrp-e-mm-loopback.c b/host/apps/omap_debug/usrp-e-mm-loopback.c
index 7a1747f9b..71519d535 100644
--- a/host/apps/omap_debug/usrp-e-mm-loopback.c
+++ b/host/apps/omap_debug/usrp-e-mm-loopback.c
@@ -194,18 +194,18 @@ int main(int argc, char *argv[])
fp = open("/dev/usrp_e0", O_RDWR);
printf("fp = %d\n", fp);
- rb = mmap(0, 202 * 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fp, 0);
+ rb = mmap(0, 102 * 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fp, 0);
if (rb == MAP_FAILED) {
perror("mmap failed");
- exit;
+ return -1;
}
printf("rb = %X\n", rb);
rxi = rb;
rx_buf = rb + 4096;
- txi = rb + 4096 + 4096 * 200;
- tx_buf = rb + 4096 * 2 + 4096 * 200;
+ txi = rb + 4096 + 4096 * 100;
+ tx_buf = rb + 4096 * 2 + 4096 * 100;
printf("rxi = %X, rx_buf = %X, txi = %X, tx_buf = %X\n", rxi, rx_buf, txi, tx_buf);