aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/types
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-03-03 16:28:26 -0800
committerJosh Blum <josh@joshknows.com>2011-03-03 16:28:26 -0800
commit98028b366f840efc3b289cc7051bed73aad0963c (patch)
tree5d26773de13c4f78326896c6eb0ff78213d0912f /host/lib/types
parentf938ed7938021c10bb0a0ce47e6d40d10f89abc2 (diff)
parent1b63cd2560886d851f3e2ba98bfddf772c44df34 (diff)
downloaduhd-98028b366f840efc3b289cc7051bed73aad0963c.tar.gz
uhd-98028b366f840efc3b289cc7051bed73aad0963c.tar.bz2
uhd-98028b366f840efc3b289cc7051bed73aad0963c.zip
Merge branch 'mb_iface' into next
Conflicts: host/lib/usrp/usrp2/usrp2_iface.hpp
Diffstat (limited to 'host/lib/types')
-rw-r--r--host/lib/types/serial.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/host/lib/types/serial.cpp b/host/lib/types/serial.cpp
index 9acf7156a..aa1133e72 100644
--- a/host/lib/types/serial.cpp
+++ b/host/lib/types/serial.cpp
@@ -54,3 +54,25 @@ byte_vector_t i2c_iface::read_eeprom(
}
return bytes;
}
+
+boost::uint32_t spi_iface::read_spi(
+ int which_slave,
+ const spi_config_t &config,
+ boost::uint16_t data,
+ size_t num_bits
+){
+ return transact_spi(
+ which_slave, config, data, num_bits, true
+ );
+}
+
+void spi_iface::write_spi(
+ int which_slave,
+ const spi_config_t &config,
+ boost::uint16_t data,
+ size_t num_bits
+){
+ transact_spi(
+ which_slave, config, data, num_bits, false
+ );
+}