aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2019-05-24 10:03:54 -0700
committerMartin Braun <martin.braun@ettus.com>2019-11-26 11:49:16 -0800
commitde6dfccc835ad46b5f4362caae66a37651716ab2 (patch)
tree020abc5d7052da9aeddef47211d0bd9aaf664d07 /host/lib
parentcd36d9d2d3dfdecae42b715d734547e48347cf4a (diff)
downloaduhd-de6dfccc835ad46b5f4362caae66a37651716ab2.tar.gz
uhd-de6dfccc835ad46b5f4362caae66a37651716ab2.tar.bz2
uhd-de6dfccc835ad46b5f4362caae66a37651716ab2.zip
rfnoc: Add block_poke support to reg_iface async msg
The async message callback now has a vector of data words instead of a single one
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/rfnoc/ctrlport_endpoint.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/host/lib/rfnoc/ctrlport_endpoint.cpp b/host/lib/rfnoc/ctrlport_endpoint.cpp
index ade5b89ee..69f45ab9e 100644
--- a/host/lib/rfnoc/ctrlport_endpoint.cpp
+++ b/host/lib/rfnoc/ctrlport_endpoint.cpp
@@ -29,7 +29,7 @@ constexpr size_t ASYNC_MESSAGE_SIZE = 6;
constexpr double DEFAULT_TIMEOUT = 0.1;
//! Default value for whether ACKs are always required
constexpr bool DEFAULT_FORCE_ACKS = false;
-}
+} // namespace
ctrlport_endpoint::~ctrlport_endpoint() = default;
@@ -259,7 +259,7 @@ public:
} else {
// Handle asynchronous message callback
ctrl_status_t status = CMD_CMDERR;
- if (rx_ctrl.op_code != OP_WRITE) {
+ if (rx_ctrl.op_code != OP_WRITE && rx_ctrl.op_code != OP_BLOCK_WRITE) {
UHD_LOG_ERROR(
"CTRLEP", "Malformed async message request: Invalid opcode");
} else if (rx_ctrl.dst_port != _local_port) {
@@ -269,7 +269,7 @@ public:
"CTRLEP", "Malformed async message request: Invalid num_data");
} else {
try {
- _handle_async_msg(rx_ctrl.address, rx_ctrl.data_vtr[0]);
+ _handle_async_msg(rx_ctrl.address, rx_ctrl.data_vtr);
status = CMD_OKAY;
} catch (...) {
UHD_LOG_ERROR("CTRLEP", "Async message handler threw an exception");
@@ -434,7 +434,7 @@ private:
const double _timebase_freq;
//! The function to call to handle an async message
- async_msg_callback_t _handle_async_msg = [](uint32_t, uint32_t) {};
+ async_msg_callback_t _handle_async_msg = async_msg_callback_t();
//! The current control sequence number of outgoing packets
uint8_t _tx_seq_num = 0;
//! The number of occupied words in the downstream buffer