![]() |
libbladeRF 2.6.0
Nuand bladeRF library
|
This section presents functionality pertaining to configuring the sample rate and mode of the device's RX and TX channels.
These functions are thread-safe.
Data Structures | |
| struct | bladerf_rational_rate |
Typedefs | |
| typedef unsigned int | bladerf_sample_rate |
Functions | |
| API_EXPORT int CALL_CONV | bladerf_set_sample_rate (struct bladerf *dev, bladerf_channel ch, bladerf_sample_rate rate, bladerf_sample_rate *actual) |
| API_EXPORT int CALL_CONV | bladerf_set_rational_sample_rate (struct bladerf *dev, bladerf_channel ch, struct bladerf_rational_rate *rate, struct bladerf_rational_rate *actual) |
| API_EXPORT int CALL_CONV | bladerf_get_sample_rate (struct bladerf *dev, bladerf_channel ch, bladerf_sample_rate *rate) |
| API_EXPORT int CALL_CONV | bladerf_get_sample_rate_range (struct bladerf *dev, bladerf_channel ch, const struct bladerf_range **range) |
| API_EXPORT int CALL_CONV | bladerf_get_rational_sample_rate (struct bladerf *dev, bladerf_channel ch, struct bladerf_rational_rate *rate) |
| typedef unsigned int bladerf_sample_rate |
Sample rate, in samples per second (sps)
Definition at line 1031 of file libbladeRF.h.
| API_EXPORT int CALL_CONV bladerf_get_rational_sample_rate | ( | struct bladerf * | dev, |
| bladerf_channel | ch, | ||
| struct bladerf_rational_rate * | rate ) |
Get the channel's sample rate in rational Hz
| dev | Device handle | |
| [in] | ch | Channel |
| [out] | rate | Current rational sample rate |
| API_EXPORT int CALL_CONV bladerf_get_sample_rate | ( | struct bladerf * | dev, |
| bladerf_channel | ch, | ||
| bladerf_sample_rate * | rate ) |
Get the channel's current sample rate in Hz
| dev | Device handle | |
| [in] | ch | Channel |
| [out] | rate | Current sample rate |
| API_EXPORT int CALL_CONV bladerf_get_sample_rate_range | ( | struct bladerf * | dev, |
| bladerf_channel | ch, | ||
| const struct bladerf_range ** | range ) |
Get the channel's supported range of sample rates
| dev | Device handle | |
| [in] | ch | Channel |
| [out] | range | Sample rate range |
| API_EXPORT int CALL_CONV bladerf_set_rational_sample_rate | ( | struct bladerf * | dev, |
| bladerf_channel | ch, | ||
| struct bladerf_rational_rate * | rate, | ||
| struct bladerf_rational_rate * | actual ) |
Configure the channel's sample rate as a rational fraction of Hz.
| dev | Device handle | |
| [in] | ch | Channel to change |
| [in] | rate | Rational sample rate |
| [out] | actual | If non-NULL, this is written with the actual rational sample rate achieved. |
| API_EXPORT int CALL_CONV bladerf_set_sample_rate | ( | struct bladerf * | dev, |
| bladerf_channel | ch, | ||
| bladerf_sample_rate | rate, | ||
| bladerf_sample_rate * | actual ) |
Configure the channel's sample rate to the specified rate in Hz.
| dev | Device handle | |
| [in] | ch | Channel |
| [in] | rate | Sample rate |
| [out] | actual | If non-NULL, this is written with the actual sample rate achieved. |