summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-09-28 10:24:53 -0700
committerJosh Blum <josh@joshknows.com>2010-09-28 10:24:53 -0700
commit137aa0ab1ed0b8f7f31a6c484fcf5a845682db80 (patch)
tree8296b54a1a3136436245e686634d4445472d87b3 /host/lib/usrp/usrp1
parent694404694515e293da6b8949e74af5f469a2e1e5 (diff)
downloaduhd-137aa0ab1ed0b8f7f31a6c484fcf5a845682db80.tar.gz
uhd-137aa0ab1ed0b8f7f31a6c484fcf5a845682db80.tar.bz2
uhd-137aa0ab1ed0b8f7f31a6c484fcf5a845682db80.zip
usrp1: modify fpga file load to use read (readsome seems to not work here in windows land)
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r--host/lib/usrp/usrp1/usrp1_ctrl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_ctrl.cpp b/host/lib/usrp/usrp1/usrp1_ctrl.cpp
index 76e8ce368..2e1bd85cd 100644
--- a/host/lib/usrp/usrp1/usrp1_ctrl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_ctrl.cpp
@@ -267,8 +267,9 @@ public:
return -1;
}
- ssize_t n;
- while ((n = file.readsome((char *)buf, sizeof(buf))) > 0) {
+ while (not file.eof()) {
+ file.read((char *)buf, sizeof(buf));
+ size_t n = file.gcount();
ret = usrp_control_write(VRQ_FPGA_LOAD, 0, FL_XFER,
buf, n);
if (ret != n) {