Merge pull request #995 from greatscottgadgets/transfer-struct-doc

libhackrf: document hackrf_transfer struct
This commit is contained in:
Michael Ossmann
2021-11-18 13:06:03 -07:00
committed by GitHub

View File

@ -126,13 +126,17 @@ enum sweep_style {
typedef struct hackrf_device hackrf_device; typedef struct hackrf_device hackrf_device;
/**
* USB transfer information passed to RX or TX callback.
* A callback should treat all these fields as read-only except that a TX callback should write to the data buffer.
*/
typedef struct { typedef struct {
hackrf_device* device; hackrf_device* device; /**< HackRF USB device for this transfer */
uint8_t* buffer; uint8_t* buffer; /**< transfer data buffer */
int buffer_length; int buffer_length; /**< length of data buffer in bytes */
int valid_length; int valid_length; /**< number of buffer bytes that were transferred */
void* rx_ctx; void* rx_ctx; /**< RX libusb context */
void* tx_ctx; void* tx_ctx; /**< TX libusb context */
} hackrf_transfer; } hackrf_transfer;
typedef struct { typedef struct {