diff options
-rw-r--r-- | firmware/usrp3/include/fw_comm_protocol.h | 3 | ||||
-rw-r--r-- | firmware/usrp3/lib/fw_comm_protocol.c | 4 | ||||
-rw-r--r-- | firmware/usrp3/n230/n230_eth_handlers.c | 1 |
3 files changed, 7 insertions, 1 deletions
diff --git a/firmware/usrp3/include/fw_comm_protocol.h b/firmware/usrp3/include/fw_comm_protocol.h index 5f0fc0768..14adb33a9 100644 --- a/firmware/usrp3/include/fw_comm_protocol.h +++ b/firmware/usrp3/include/fw_comm_protocol.h @@ -54,6 +54,8 @@ extern "C" { #define FW_COMM_GENERATE_ID(prod) ((((uint32_t) FW_COMM_PROTOCOL_SIGNATURE) << 0) | \ (((uint32_t) prod) << 16) | \ (((uint32_t) FW_COMM_PROTOCOL_VERSION) << 24)) + +#define FW_COMM_GET_PROTOCOL_SIG(id) ((uint16_t)(id & 0xFFFF)) #define FW_COMM_GET_PRODUCT_ID(id) ((uint8_t)(id >> 16)) #define FW_COMM_GET_PROTOCOL_VER(id) ((uint8_t)(id >> 24)) @@ -90,6 +92,7 @@ bool process_fw_comm_protocol_pkt( const fw_comm_pkt_t* request, fw_comm_pkt_t* response, uint8_t product_id, + uint32_t iface_id, poke32_func poke_callback, peek32_func peek_callback ); diff --git a/firmware/usrp3/lib/fw_comm_protocol.c b/firmware/usrp3/lib/fw_comm_protocol.c index cf13e7d22..bb0297e8d 100644 --- a/firmware/usrp3/lib/fw_comm_protocol.c +++ b/firmware/usrp3/lib/fw_comm_protocol.c @@ -23,6 +23,7 @@ bool process_fw_comm_protocol_pkt( const fw_comm_pkt_t* request, fw_comm_pkt_t* response, uint8_t product_id, + uint32_t iface_id, poke32_func poke_callback, peek32_func peek_callback) { @@ -44,8 +45,9 @@ bool process_fw_comm_protocol_pkt( //Otherwise, run the command set by the flags switch (request->flags & FW_COMM_FLAGS_CMD_MASK) { case FW_COMM_CMD_ECHO: { - //Do nothing. UHD_FW_TRACE(DEBUG, "fw_comm_protocol::echo()"); + response->data_words = 1; + response->data[0] = iface_id; } break; case FW_COMM_CMD_POKE32: { diff --git a/firmware/usrp3/n230/n230_eth_handlers.c b/firmware/usrp3/n230/n230_eth_handlers.c index 30b803489..aebae4161 100644 --- a/firmware/usrp3/n230/n230_eth_handlers.c +++ b/firmware/usrp3/n230/n230_eth_handlers.c @@ -76,6 +76,7 @@ void n230_handle_udp_fw_comms( bool send_response = process_fw_comm_protocol_pkt( request, &response, N230_FW_PRODUCT_ID, + (uint32_t)ethno, n230_poke32, n230_peek32); if (send_response) { |