diff options
author | Josh Blum <josh@joshknows.com> | 2010-04-07 00:46:42 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-04-07 00:46:42 -0700 |
commit | b66a74ff1f629af714e26040b410d472c08be522 (patch) | |
tree | e7a60cb4e3c3d113fd081c8df0d4405eb569f3dc /host/lib/usrp/dboard | |
parent | e6151334096167d1d26609f7233105020af91f40 (diff) | |
download | uhd-b66a74ff1f629af714e26040b410d472c08be522.tar.gz uhd-b66a74ff1f629af714e26040b410d472c08be522.tar.bz2 uhd-b66a74ff1f629af714e26040b410d472c08be522.zip |
Reworked the spi part of the dboard interface.
It turns out to be more complicated.
The integer type is better for holding the bits.
The edges can be different, so the spi config hold 2 edge setting for mosi and miso.
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r-- | host/lib/usrp/dboard/db_rfx.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp index 57ea03da5..68fa51144 100644 --- a/host/lib/usrp/dboard/db_rfx.cpp +++ b/host/lib/usrp/dboard/db_rfx.cpp @@ -136,17 +136,11 @@ void rfx_xcvr::reload_adf4360_regs(void){ (adf4360_regs_t::ADDR_RCOUNTER) ; BOOST_FOREACH(adf4360_regs_t::addr_t addr, addrs){ - boost::uint32_t reg = _adf4360_regs.get_reg(addr); - dboard_interface::byte_vector_t spi_bytes = list_of - ((reg >> 16) & 0xff) - ((reg >> 8) & 0xff) - ((reg >> 0) & 0xff) - ; - //this->get_interface.write_spi( - // dboard_interface::SPI_DEV_TX, - // dboard_interface::SPI_EDGE_FALL, - // spi_bytes - //); + this->get_interface()->write_spi( + dboard_interface::UNIT_TYPE_TX, + dboard_interface::spi_config_t::EDGE_RISE, + _adf4360_regs.get_reg(addr), 24 + ); } } |