diff options
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r-- | host/lib/usrp/usrp1/dboard_iface.cpp | 8 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/io_impl.cpp | 11 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_iface.cpp | 4 |
3 files changed, 17 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp index 39850d5d1..4c3141d9e 100644 --- a/host/lib/usrp/usrp1/dboard_iface.cpp +++ b/host/lib/usrp/usrp1/dboard_iface.cpp @@ -113,8 +113,8 @@ public: void set_gpio_debug(unit_t, int); boost::uint16_t read_gpio(unit_t); - void write_i2c(boost::uint8_t, const byte_vector_t &); - byte_vector_t read_i2c(boost::uint8_t, size_t); + void write_i2c(boost::uint16_t, const byte_vector_t &); + byte_vector_t read_i2c(boost::uint16_t, size_t); void write_spi(unit_t unit, const spi_config_t &config, @@ -386,13 +386,13 @@ boost::uint32_t usrp1_dboard_iface::read_write_spi(unit_t unit, /*********************************************************************** * I2C **********************************************************************/ -void usrp1_dboard_iface::write_i2c(boost::uint8_t addr, +void usrp1_dboard_iface::write_i2c(boost::uint16_t addr, const byte_vector_t &bytes) { return _iface->write_i2c(addr, bytes); } -byte_vector_t usrp1_dboard_iface::read_i2c(boost::uint8_t addr, +byte_vector_t usrp1_dboard_iface::read_i2c(boost::uint16_t addr, size_t num_bytes) { return _iface->read_i2c(addr, num_bytes); diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp index 8940a92bb..d384eb13f 100644 --- a/host/lib/usrp/usrp1/io_impl.cpp +++ b/host/lib/usrp/usrp1/io_impl.cpp @@ -356,6 +356,11 @@ public: return _stc->recv_post(metadata, num_samps_recvd); } + void issue_stream_cmd(const stream_cmd_t &stream_cmd) + { + _stc->issue_stream_cmd(stream_cmd); + } + private: size_t _max_num_samps; soft_time_ctrl::sptr _stc; @@ -410,6 +415,12 @@ public: return num_samps_sent; } + bool recv_async_msg( + async_metadata_t &async_metadata, double timeout = 0.1 + ){ + return _stc->get_async_queue().pop_with_timed_wait(async_metadata, timeout); + } + private: size_t _max_num_samps; soft_time_ctrl::sptr _stc; diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp index 16b747e45..9301721aa 100644 --- a/host/lib/usrp/usrp1/usrp1_iface.cpp +++ b/host/lib/usrp/usrp1/usrp1_iface.cpp @@ -104,11 +104,11 @@ public: /******************************************************************* * I2C ******************************************************************/ - void write_i2c(boost::uint8_t addr, const byte_vector_t &bytes){ + void write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){ return _ctrl_transport->write_i2c(addr, bytes); } - byte_vector_t read_i2c(boost::uint8_t addr, size_t num_bytes){ + byte_vector_t read_i2c(boost::uint16_t addr, size_t num_bytes){ return _ctrl_transport->read_i2c(addr, num_bytes); } |