summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/dboard_interface.hpp68
1 files changed, 27 insertions, 41 deletions
diff --git a/host/include/uhd/usrp/dboard_interface.hpp b/host/include/uhd/usrp/dboard_interface.hpp
index dab5a2281..43fd1f143 100644
--- a/host/include/uhd/usrp/dboard_interface.hpp
+++ b/host/include/uhd/usrp/dboard_interface.hpp
@@ -25,6 +25,33 @@
namespace uhd{ namespace usrp{
+//spi configuration struct
+struct UHD_API spi_config_t{
+ /*!
+ * The edge type specifies when data is valid
+ * relative to the edge of the serial clock.
+ */
+ enum edge_t{
+ EDGE_RISE = 'r',
+ EDGE_FALL = 'f'
+ };
+
+ //! on what edge is the mosi data valid?
+ edge_t mosi_edge;
+
+ //! on what edge is the miso data valid?
+ edge_t miso_edge;
+
+ /*!
+ * Create a new spi config.
+ * \param edge the default edge for mosi and miso
+ */
+ spi_config_t(edge_t edge = EDGE_RISE){
+ mosi_edge = edge;
+ miso_edge = edge;
+ }
+};
+
/*!
* The daughter board dboard_interface to be subclassed.
* A dboard instance dboard_interfaces with the mboard though this api.
@@ -42,33 +69,6 @@ public:
UNIT_TYPE_TX = 't'
};
- //spi configuration struct
- struct UHD_API spi_config_t{
- /*!
- * The edge type specifies when data is valid
- * relative to the edge of the serial clock.
- */
- enum edge_t{
- EDGE_RISE = 'r',
- EDGE_FALL = 'f'
- };
-
- //! on what edge is the mosi data valid?
- edge_t mosi_edge;
-
- //! on what edge is the miso data valid?
- edge_t miso_edge;
-
- /*!
- * Create a new spi config.
- * \param edge the default edge for mosi and miso
- */
- spi_config_t(edge_t edge = EDGE_RISE){
- mosi_edge = edge;
- miso_edge = edge;
- }
- };
-
//tell the host which gpio bank
enum gpio_bank_t{
GPIO_BANK_RX = 'r',
@@ -155,20 +155,6 @@ public:
) = 0;
/*!
- * \brief Read data to SPI bus peripheral.
- *
- * \param unit which unit, rx or tx
- * \param config configuration settings
- * \param num_bits the number of bits
- * \return the data that was read
- */
- virtual boost::uint32_t read_spi(
- unit_type_t unit,
- const spi_config_t &config,
- size_t num_bits
- ) = 0;
-
- /*!
* \brief Read and write data to SPI bus peripheral.
* The data read back will be the same length as the input buffer.
*