Added methods to query daughterboard parameters. Merged eb/u2-wip2
[debian/gnuradio] / usrp2 / firmware / include / usrp2_eth_packet.h
index ca13d61adfc236c0df4a0e4d51296e3958a471d9..ed3ce1fe31af486d22131e6be4bcb99963b23be8 100644 (file)
@@ -181,6 +181,8 @@ typedef struct {
 #define        OP_STOP_RX_REPLY             (OP_STOP_RX | OP_REPLY_BIT)
 #define        OP_CONFIG_MIMO               8
 #define OP_CONFIG_MIMO_REPLY        (OP_CONFIG_MIMO | OP_REPLY_BIT)
+#define        OP_DBOARD_INFO               9
+#define        OP_DBOARD_INFO_REPLY         (OP_DBOARD_INFO | OP_REPLY_BIT)
 
 
 //#define OP_WRITE_REG          xx     // not implemented
@@ -199,7 +201,7 @@ typedef struct {
  *
  * Used by:
  *  OP_EOP, OP_BURN_MAC_ADDR_REPLY, OP_START_RX_STREAMING_REPLY,
- *  OP_STOP_RX_REPLY
+ *  OP_STOP_RX_REPLY, OP_DBOARD_INFO
  */
 typedef struct {
   uint8_t      opcode;
@@ -348,6 +350,36 @@ typedef struct {
 } op_config_mimo_t;
 
 
+/*!
+ * \brief High-level information about daughterboards
+ */
+typedef struct {
+  int32_t      dbid;           //< d'board ID (-1 none, -2 invalid eeprom)
+  uint32_t     freq_min_hi;    //< high 32-bits of 64-bit fxpt_freq (Q44.20)
+  uint32_t     freq_min_lo;    //< low  32-bits of 64-bit fxpt_freq (Q44.20)
+  uint32_t     freq_max_hi;    //< high 32-bits of 64-bit fxpt_freq (Q44.20)
+  uint32_t     freq_max_lo;    //< low  32-bits of 64-bit fxpt_freq (Q44.20)
+  uint16_t     gain_min;       //< min gain that can be set. fxpt_db (Q9.7)
+  uint16_t     gain_max;       //< max gain that can be set. fxpt_db (Q9.7)
+  uint16_t     gain_step_size; //< fxpt_db (Q9.7)
+} u2_db_info_t;
+
+
+/*!
+ * \brief Reply to d'board info request
+ */
+typedef struct {
+  uint8_t      opcode;
+  uint8_t      len;
+  uint8_t      rid;
+  uint8_t      ok;             // request was successful (bool)
+
+  u2_db_info_t tx_db_info;
+  u2_db_info_t rx_db_info;
+} _AL4 op_dboard_info_reply_t;
+
+
+
 /*
  * ================================================================
  *             union of all of subpacket types