summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-10 15:26:21 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-16 17:29:22 -0700
commitf89f7476a1c3452511d54ec6839f574a7a37c0fe (patch)
tree65c396bf0a20df08cbc6e42ed9d532d1b3fd61d0 /host
parent38b6482e254c1b048bb724653d95f5630f92e279 (diff)
downloaduhd-f89f7476a1c3452511d54ec6839f574a7a37c0fe.tar.gz
uhd-f89f7476a1c3452511d54ec6839f574a7a37c0fe.tar.bz2
uhd-f89f7476a1c3452511d54ec6839f574a7a37c0fe.zip
Brought in changes to SPI to match up with parallel branch so they share a common protocol.
Diffstat (limited to 'host')
-rw-r--r--host/lib/usrp/usrp2/fw_common.h6
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp2/fw_common.h b/host/lib/usrp/usrp2/fw_common.h
index a781c1a21..85d41d57f 100644
--- a/host/lib/usrp/usrp2/fw_common.h
+++ b/host/lib/usrp/usrp2/fw_common.h
@@ -104,12 +104,12 @@ typedef struct{
union{
__stdint(uint32_t) ip_addr;
struct {
- __stdint(uint8_t) dev;
+ __stdint(uint32_t) dev;
+ __stdint(uint32_t) data;
__stdint(uint8_t) miso_edge;
__stdint(uint8_t) mosi_edge;
- __stdint(uint8_t) readback;
- __stdint(uint32_t) data;
__stdint(uint8_t) num_bits;
+ __stdint(uint8_t) readback;
} spi_args;
struct {
__stdint(uint8_t) addr;
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 4124221ef..2d450bfc6 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -115,7 +115,7 @@ public:
//setup the out data
usrp2_ctrl_data_t out_data;
out_data.id = htonl(USRP2_CTRL_ID_TRANSACT_ME_SOME_SPI_BRO);
- out_data.data.spi_args.dev = which_slave;
+ out_data.data.spi_args.dev = htonl(which_slave);
out_data.data.spi_args.miso_edge = spi_edge_to_otw[config.miso_edge];
out_data.data.spi_args.mosi_edge = spi_edge_to_otw[config.mosi_edge];
out_data.data.spi_args.readback = (readback)? 1 : 0;