diff options
author | Ben Hilburn <ben.hilburn@ettus.com> | 2014-02-04 11:04:07 -0800 |
---|---|---|
committer | Ben Hilburn <ben.hilburn@ettus.com> | 2014-02-04 11:04:07 -0800 |
commit | 178ac3f1c9950d383c8f64b3df464c0f943c4a23 (patch) | |
tree | 318ed621a7b59b7d34d4ce6e4a92f73f0bcef509 /firmware/x300/include/wb_pkt_iface64.h | |
parent | 2718ac110fa931cc29daf7cb3dc5ab6230ee02ab (diff) | |
download | uhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.tar.gz uhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.tar.bz2 uhd-178ac3f1c9950d383c8f64b3df464c0f943c4a23.zip |
Merging USRP X300 and X310 support!!
Diffstat (limited to 'firmware/x300/include/wb_pkt_iface64.h')
-rw-r--r-- | firmware/x300/include/wb_pkt_iface64.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/firmware/x300/include/wb_pkt_iface64.h b/firmware/x300/include/wb_pkt_iface64.h new file mode 100644 index 000000000..aa3c174ed --- /dev/null +++ b/firmware/x300/include/wb_pkt_iface64.h @@ -0,0 +1,44 @@ + +// Copyright 2012 Ettus Research LLC + +#ifndef INCLUDED_WB_PKT_IFACE64_H +#define INCLUDED_WB_PKT_IFACE64_H + +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> + +//! opaque, dont touch insides +typedef struct +{ + uint32_t base; + uint32_t ctrl; + uint32_t config_addr; +} wb_pkt_iface64_config_t; + +//! Init the wb slave for packet interface +wb_pkt_iface64_config_t wb_pkt_iface64_init(const uint32_t base, const size_t ctrl_offset); + +/*! + * Poll if an packet has been received. + * If yes, return the pointer to the pkt, num_bytes is set. + * Otherwise, return null. + */ +const void *wb_pkt_iface64_rx_try_claim(wb_pkt_iface64_config_t *config, size_t *num_bytes); + +/*! + * Release the hold on a received packet. + */ +void wb_pkt_iface64_rx_release(wb_pkt_iface64_config_t *config); + +/*! + * Aquire the buffer for an outgoing packet. + */ +void *wb_pkt_iface64_tx_claim(wb_pkt_iface64_config_t *config); + +/*! + * Submit an outgoing packet from a filled the buffer. + */ +void wb_pkt_iface64_tx_submit(wb_pkt_iface64_config_t *config, const size_t num_bytes); + +#endif /* INCLUDED_WB_PKT_IFACE64_H */ |