aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/fw_common.h
diff options
context:
space:
mode:
authorroot <root@usrp1-e.(none)>2010-03-23 13:35:36 +0000
committerroot <root@usrp1-e.(none)>2010-03-23 13:35:36 +0000
commitc329da8f953c3981e23791c688f350b27541554a (patch)
tree3447dd657bf7221e3b4b1a9147ce1bd2ffa430b9 /host/lib/usrp/usrp2/fw_common.h
parentf6ec1e45117f5794facd1cd8e11cbfacabdeb166 (diff)
parent09a21dd6d4bc5b7f032e07cfabcba9f55d25b0f6 (diff)
downloaduhd-c329da8f953c3981e23791c688f350b27541554a.tar.gz
uhd-c329da8f953c3981e23791c688f350b27541554a.tar.bz2
uhd-c329da8f953c3981e23791c688f350b27541554a.zip
Merge branch 'u1e_uhd' of git@ettus.sourcerepo.com:ettus/uhd into u1e_uhd
Diffstat (limited to 'host/lib/usrp/usrp2/fw_common.h')
-rw-r--r--host/lib/usrp/usrp2/fw_common.h108
1 files changed, 67 insertions, 41 deletions
diff --git a/host/lib/usrp/usrp2/fw_common.h b/host/lib/usrp/usrp2/fw_common.h
index 3def8ddaa..7fcae6fb2 100644
--- a/host/lib/usrp/usrp2/fw_common.h
+++ b/host/lib/usrp/usrp2/fw_common.h
@@ -24,9 +24,18 @@
* Therefore, this header may only contain valid C code.
*/
#ifdef __cplusplus
+#include <boost/cstdint.hpp>
+#define _SINS_ boost:://stdint namespace when in c++
extern "C" {
+#else
+#include <stdint.h>
+#define _SINS_
#endif
+// size of the vrt header and trailer to the host
+#define USRP2_HOST_RX_VRT_HEADER_WORDS32 5
+#define USRP2_HOST_RX_VRT_TRAILER_WORDS32 1 //FIXME fpga sets wrong header size when no trailer present
+
// udp ports for the usrp2 communication
// Dynamic and/or private ports: 49152-65535
#define USRP2_UDP_CTRL_PORT 49152
@@ -87,6 +96,12 @@ typedef enum{
USRP2_CTRL_ID_SETUP_THIS_DUC_FOR_ME_BRO,
USRP2_CTRL_ID_TOTALLY_SETUP_THE_DUC_DUDE,
+ USRP2_CTRL_ID_GOT_A_NEW_TIME_FOR_YOU_BRO,
+ USRP2_CTRL_ID_SWEET_I_GOT_THAT_TIME_DUDE,
+
+ USRP2_CTRL_ID_UPDATE_THOSE_MUX_SETTINGS_BRO,
+ USRP2_CTRL_ID_UPDATED_THE_MUX_SETTINGS_DUDE,
+
USRP2_CTRL_ID_PEACE_OUT
} usrp2_ctrl_id_t;
@@ -118,68 +133,79 @@ typedef enum{
} usrp2_clk_edge_t;
typedef struct{
- uint32_t id;
- uint32_t seq;
+ _SINS_ uint32_t id;
+ _SINS_ uint32_t seq;
union{
- uint32_t ip_addr;
- uint8_t mac_addr[6];
+ _SINS_ uint32_t ip_addr;
+ _SINS_ uint8_t mac_addr[6];
struct {
- uint16_t rx_id;
- uint16_t tx_id;
+ _SINS_ uint16_t rx_id;
+ _SINS_ uint16_t tx_id;
} dboard_ids;
struct {
- uint8_t pps_source;
- uint8_t pps_polarity;
- uint8_t ref_source;
- uint8_t _pad;
+ _SINS_ uint8_t pps_source;
+ _SINS_ uint8_t pps_polarity;
+ _SINS_ uint8_t ref_source;
+ _SINS_ uint8_t _pad;
} clock_config;
struct {
- uint8_t bank;
- uint8_t _pad[3];
- uint16_t value;
- uint16_t mask;
+ _SINS_ uint8_t bank;
+ _SINS_ uint8_t _pad[3];
+ _SINS_ uint16_t value;
+ _SINS_ uint16_t mask;
} gpio_config;
struct {
- uint8_t bank;
- uint8_t _pad[3];
- uint16_t tx_value;
- uint16_t rx_value;
- uint16_t mask;
+ _SINS_ uint8_t bank;
+ _SINS_ uint8_t _pad[3];
+ _SINS_ uint16_t tx_value;
+ _SINS_ uint16_t rx_value;
+ _SINS_ 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)];
+ _SINS_ uint8_t dev;
+ _SINS_ uint8_t latch;
+ _SINS_ uint8_t push;
+ _SINS_ uint8_t readback;
+ _SINS_ uint8_t bytes;
+ _SINS_ uint8_t data[sizeof(_SINS_ uint32_t)];
} spi_args;
struct {
- uint8_t addr;
- uint8_t bytes;
- uint8_t data[sizeof(uint32_t)];
+ _SINS_ uint8_t addr;
+ _SINS_ uint8_t bytes;
+ _SINS_ uint8_t data[sizeof(_SINS_ uint32_t)];
} i2c_args;
struct {
- uint8_t dir;
- uint8_t which;
- uint8_t _pad[2];
- uint32_t value;
+ _SINS_ uint8_t dir;
+ _SINS_ uint8_t which;
+ _SINS_ uint8_t _pad[2];
+ _SINS_ uint32_t value;
} aux_args;
struct {
- uint32_t freq_word;
- uint32_t decim;
+ _SINS_ uint32_t freq_word;
+ _SINS_ uint32_t decim;
+ _SINS_ uint32_t scale_iq;
} ddc_args;
struct {
- uint8_t enabled;
- uint8_t _pad[3];
- uint32_t secs;
- uint32_t ticks;
+ _SINS_ uint8_t enabled;
+ _SINS_ uint8_t _pad[3];
+ _SINS_ uint32_t secs;
+ _SINS_ uint32_t ticks;
+ _SINS_ uint32_t samples;
} streaming;
struct {
- uint32_t freq_word;
- uint32_t interp;
- uint32_t scale_iq;
+ _SINS_ uint32_t freq_word;
+ _SINS_ uint32_t interp;
+ _SINS_ uint32_t scale_iq;
} duc_args;
+ struct {
+ _SINS_ uint32_t secs;
+ _SINS_ uint32_t ticks;
+ _SINS_ uint8_t now;
+ } time_args;
+ struct {
+ _SINS_ uint32_t rx_mux;
+ _SINS_ uint32_t tx_mux;
+ } mux_args;
} data;
} usrp2_ctrl_data_t;