libbladeRF
2.5.0
Nuand bladeRF library
|
Data Structures | |
struct | bladerf_metadata |
Macros | |
#define | BLADERF_META_STATUS_OVERRUN (1 << 0) |
#define | BLADERF_META_STATUS_UNDERRUN (1 << 1) |
#define | BLADERF_META_FLAG_TX_BURST_START (1 << 0) |
#define | BLADERF_META_FLAG_TX_BURST_END (1 << 1) |
#define | BLADERF_META_FLAG_TX_NOW (1 << 2) |
#define | BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP (1 << 3) |
#define | BLADERF_META_FLAG_RX_NOW (1 << 31) |
#define | BLADERF_META_FLAG_RX_HW_UNDERFLOW (1 << 0) |
#define | BLADERF_META_FLAG_RX_HW_MINIEXP1 (1 << 16) |
#define | BLADERF_META_FLAG_RX_HW_MINIEXP2 (1 << 17) |
#define BLADERF_META_FLAG_RX_HW_MINIEXP1 (1 << 16) |
This flag is asserted in bladerf_metadata.status by the hardware if mini expansion IO pin 1 is asserted.
Definition at line 2432 of file libbladeRF.h.
#define BLADERF_META_FLAG_RX_HW_MINIEXP2 (1 << 17) |
This flag is asserted in bladerf_metadata.status by the hardware if mini expansion IO pin 2 is asserted.
Definition at line 2438 of file libbladeRF.h.
#define BLADERF_META_FLAG_RX_HW_UNDERFLOW (1 << 0) |
This flag is asserted in bladerf_metadata.status by the hardware when an underflow is detected in the sample buffering system on the device.
Definition at line 2426 of file libbladeRF.h.
#define BLADERF_META_FLAG_RX_NOW (1 << 31) |
This flag indicates that calls to bladerf_sync_rx should return any available samples, rather than wait until the timestamp indicated in the bladerf_metadata timestamp field.
Definition at line 2420 of file libbladeRF.h.
#define BLADERF_META_FLAG_TX_BURST_END (1 << 1) |
Mark the associated buffer as the end of a burst transmission. This will flush the remainder of the sync interface's current working buffer and enqueue samples into the hardware's transmit FIFO.
As of libbladeRF v1.3.0, it is no longer necessary for the API user to ensure that the final 3 samples of a burst are \(0 + 0 j\). libbladeRF now ensures this hardware requirement is upheld.
Specifying this flag and flushing the sync interface's working buffer implies that the next timestamp that can be transmitted is the current timestamp plus the duration of the burst that this flag is ending and the remaining length of the remaining buffer that is flushed. (The buffer size, in this case, is the buffer_size
value passed to the previous bladerf_sync_config() call.)
Rather than attempting to keep track of the number of samples sent with respect to buffer sizes, it is easiest to always assume 1 buffer's worth of time is required between bursts. In this case "buffer" refers to the buffer_size
parameter provided to bladerf_sync_config().) If this is too much time, consider using the BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP flag.
Definition at line 2383 of file libbladeRF.h.
#define BLADERF_META_FLAG_TX_BURST_START (1 << 0) |
Mark the associated buffer as the start of a burst transmission.
When using this flag, the bladerf_metadata::timestamp field should contain the timestamp at which samples should be sent.
Between specifying the BLADERF_META_FLAG_TX_BURST_START and BLADERF_META_FLAG_TX_BURST_END flags, there is no need for the user to the bladerf_metadata::timestamp field because the library will ensure the correct value is used, based upon the timestamp initially provided and the number of samples that have been sent.
Definition at line 2355 of file libbladeRF.h.
#define BLADERF_META_FLAG_TX_NOW (1 << 2) |
Use this flag in conjunction with BLADERF_META_FLAG_TX_BURST_START to indicate that the burst should be transmitted as soon as possible, as opposed to waiting for a specific timestamp.
When this flag is used, there is no need to set the bladerf_metadata::timestamp field.
Definition at line 2393 of file libbladeRF.h.
#define BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP (1 << 3) |
Use this flag within a burst (i.e., between the use of BLADERF_META_FLAG_TX_BURST_START and BLADERF_META_FLAG_TX_BURST_END) to specify that bladerf_sync_tx() should read the bladerf_metadata::timestamp field and zero-pad samples up to the specified timestamp. The provided samples will then be transmitted at that timestamp.
Use this flag when potentially flushing an entire buffer via the BLADERF_META_FLAG_TX_BURST_END would yield an unacceptably large gap in the transmitted samples.
In some applications where a transmitter is constantly transmitting with extremely small gaps (less than a buffer), users may end up using a single BLADERF_META_FLAG_TX_BURST_START, and then numerous calls to bladerf_sync_tx() with the BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP flag set. The BLADERF_META_FLAG_TX_BURST_END would only be used to end the stream when shutting down.
Definition at line 2413 of file libbladeRF.h.
#define BLADERF_META_STATUS_OVERRUN (1 << 0) |
A sample overrun has occurred.
This indicates that either the host (more likely) or the FPGA is not keeping up with the incoming samples.
Definition at line 2322 of file libbladeRF.h.
#define BLADERF_META_STATUS_UNDERRUN (1 << 1) |
A sample underrun has occurred.
This generally only occurs on the TX channel when the FPGA is starved of samples.
Definition at line 2332 of file libbladeRF.h.