#include <uhd/types/serial.hpp>
Public Types | |
typedef boost::shared_ptr< spi_iface > | sptr |
Public Member Functions | |
virtual | ~spi_iface (void) |
virtual boost::uint32_t | transact_spi (int which_slave, const spi_config_t &config, boost::uint32_t data, size_t num_bits, bool readback)=0 |
virtual boost::uint32_t | read_spi (int which_slave, const spi_config_t &config, boost::uint32_t data, size_t num_bits) |
virtual void | write_spi (int which_slave, const spi_config_t &config, boost::uint32_t data, size_t num_bits) |
The SPI interface class. Provides routines to transact SPI and do other useful things which haven't been defined yet.
typedef boost::shared_ptr<spi_iface> uhd::spi_iface::sptr |
|
virtual |
|
virtual |
Read from the SPI bus.
which_slave | the slave device number |
config | spi config args |
data | the bits to write out (be sure to set write bit) |
num_bits | how many bits in data |
|
pure virtual |
Perform a spi transaction.
which_slave | the slave device number |
config | spi config args |
data | the bits to write |
num_bits | how many bits in data |
readback | true to readback a value |
|
virtual |
Write to the SPI bus.
which_slave | the slave device number |
config | spi config args |
data | the bits to write |
num_bits | how many bits in data |