aboutsummaryrefslogtreecommitdiffstats
path: root/lib/usrp/mboard/usrp2_fw_common.h
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-02-12 18:07:55 -0800
committerJosh Blum <josh@joshknows.com>2010-02-12 18:07:55 -0800
commit9fff25f4e5da179ea29ff44278e0415a337870cb (patch)
treecfbee4cf2921fd4bd415e3af1c1d466f79bab3d7 /lib/usrp/mboard/usrp2_fw_common.h
parent350f5c5decca20a54132867283448fd32226bbc2 (diff)
downloaduhd-9fff25f4e5da179ea29ff44278e0415a337870cb.tar.gz
uhd-9fff25f4e5da179ea29ff44278e0415a337870cb.tar.bz2
uhd-9fff25f4e5da179ea29ff44278e0415a337870cb.zip
Added a templated dictionary class because its more useful than map.
Made the device addrs into a string:string dict. If its all strings we dont have to change the top level caller for new product. Created shared_iovec class to manage memory for device recvs. Work on the bro/dude control protocol for usrp2.
Diffstat (limited to 'lib/usrp/mboard/usrp2_fw_common.h')
-rw-r--r--lib/usrp/mboard/usrp2_fw_common.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/lib/usrp/mboard/usrp2_fw_common.h b/lib/usrp/mboard/usrp2_fw_common.h
index 217d8cf1c..4ea9d5467 100644
--- a/lib/usrp/mboard/usrp2_fw_common.h
+++ b/lib/usrp/mboard/usrp2_fw_common.h
@@ -28,24 +28,38 @@ extern "C" {
#endif
// udp ports for the usrp2 communication
-// Dynamic and/or private ports: 49152–65535
+// Dynamic and/or private ports: 49152-65535
#define USRP2_UDP_CTRL_PORT 49152
#define USRP2_UDP_DATA_PORT 49153
typedef enum{
- USRP2_CTRL_ID_NONE,
- USRP2_CTRL_ID_HELLO
+ USRP2_CTRL_ID_HUH_WHAT,
+ //USRP2_CTRL_ID_FOR_SURE, //TODO error condition enums
+ //USRP2_CTRL_ID_SUX_MAN,
+ USRP2_CTRL_ID_GIVE_ME_YOUR_IP_ADDR_BRO,
+ USRP2_CTRL_ID_THIS_IS_MY_IP_ADDR_DUDE,
+ USRP2_CTRL_ID_HERE_IS_A_NEW_IP_ADDR_BRO,
+ USRP2_CTRL_ID_GIVE_ME_YOUR_MAC_ADDR_BRO,
+ USRP2_CTRL_ID_THIS_IS_MY_MAC_ADDR_DUDE,
+ USRP2_CTRL_ID_HERE_IS_A_NEW_MAC_ADDR_BRO
} usrp2_ctrl_id_t;
typedef struct{
uint32_t id;
uint32_t seq;
union{
- struct{
- uint32_t ip_addr;
- uint8_t mac_addr[6];
- uint8_t _padding[2];
- } discovery_addrs;
+ uint32_t ip_addr;
+ uint8_t mac_addr[6];
+ /*struct {
+ uint8_t bank;
+ uint16_t ddr;
+ uint16_t mask;
+ } gpio_ddr_args;
+ struct {
+ uint8_t bank;
+ uint16_t val;
+ uint16_t mask;
+ } gpio_val_args;*/
} data;
} usrp2_ctrl_data_t;