diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2015-12-30 19:43:28 -0800 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2016-01-05 17:35:14 -0800 |
commit | f164e23fa079a971417c0e611bc631e3bc4790fd (patch) | |
tree | 640a6e0fc580a30a56d019b68d26cba16503f8ac /firmware | |
parent | aea284abb908575c388484c0b1a46c5100b09718 (diff) | |
download | uhd-f164e23fa079a971417c0e611bc631e3bc4790fd.tar.gz uhd-f164e23fa079a971417c0e611bc631e3bc4790fd.tar.bz2 uhd-f164e23fa079a971417c0e611bc631e3bc4790fd.zip |
n230: Output interface ID in echo request
Diffstat (limited to 'firmware')
-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) { |