From 4fb4572e1a16f54439f57655f90e0fc937c57c1e Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 17 Feb 2010 16:23:12 -0800 Subject: Worked out spi api for the dboard interface. Created usrp2 spi transaction control on host and fw --- host/lib/usrp/mboard/usrp2/fw_common.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'host/lib/usrp/mboard/usrp2/fw_common.h') diff --git a/host/lib/usrp/mboard/usrp2/fw_common.h b/host/lib/usrp/mboard/usrp2/fw_common.h index 8cd15c7c3..8e5810a14 100644 --- a/host/lib/usrp/mboard/usrp2/fw_common.h +++ b/host/lib/usrp/mboard/usrp2/fw_common.h @@ -63,6 +63,9 @@ typedef enum{ USRP2_CTRL_ID_USE_THESE_ATR_SETTINGS_BRO, USRP2_CTRL_ID_GOT_THE_ATR_SETTINGS_DUDE, + USRP2_CTRL_ID_TRANSACT_ME_SOME_SPI_BRO, + USRP2_CTRL_ID_OMG_TRANSACTED_SPI_DUDE, + USRP2_CTRL_ID_PEACE_OUT } usrp2_ctrl_id_t; @@ -84,9 +87,14 @@ typedef enum{ } usrp2_ref_source_t; typedef enum{ - USRP2_GPIO_BANK_RX, - USRP2_GPIO_BANK_TX -} usrp2_gpio_bank_t; + USRP2_DIR_RX, + USRP2_DIR_TX +} usrp2_dir_which_t; + +typedef enum{ + USRP2_CLK_EDGE_RISE, + USRP2_CLK_EDGE_FALL +} usrp2_clk_edge_t; typedef struct{ uint32_t id; @@ -117,6 +125,14 @@ typedef struct{ uint16_t rx_value; uint16_t mask; } atr_config; + struct { + uint8_t dev; + uint8_t latch; + uint8_t push; + uint8_t readback; + uint8_t bytes; + uint8_t data[sizeof(uint32_t)]; + } spi_args; } data; } usrp2_ctrl_data_t; -- cgit v1.2.3