These functions are thread-safe.
◆ BLADERF_RETUNE_NOW
◆ bladerf_cancel_scheduled_retunes()
Cancel all pending scheduled retune operations for the specified channel.
This will be done automatically during bladerf_close() to ensure that previously queued retunes do not continue to occur after closing and then later re-opening a device.
- Parameters
-
| dev | Device handle |
[in] | ch | Channel |
- Returns
- 0 on success, value from Error codes list on failure.
◆ bladerf_get_quick_tune()
Fetch parameters used to tune the transceiver to the current frequency for use with bladerf_schedule_retune() to perform a "quick retune."
This allows for a faster retune, with a potential trade off of increased phase noise.
- Note
- These parameters are sensitive to changes in the operating environment, and should be "refreshed" if planning to use the "quick retune" functionality over a long period of time.
- Precondition
- bladerf_set_frequency() or bladerf_schedule_retune() have previously been used to retune to the desired frequency.
- Parameters
-
| dev | Device handle |
[in] | ch | Channel |
[out] | quick_tune | Quick retune parameters |
- Returns
- 0 on success, value from Error codes list on failure
◆ bladerf_schedule_retune()
Schedule a frequency retune to occur at specified sample timestamp value.
- Precondition
- bladerf_sync_config() must have been called with the BLADERF_FORMAT_SC16_Q11_META format for the associated channel in order to enable timestamps. (The timestamped metadata format must be enabled in order to use this function.)
- Parameters
-
| dev | Device handle |
[in] | ch | Channel |
[in] | timestamp | Channel's sample timestamp to perform the retune operation. If this value is in the past, the retune will occur immediately. To perform the retune immediately, specify BLADERF_RETUNE_NOW. |
[in] | frequency | Desired frequency, in Hz. |
[in] | quick_tune | If non-NULL, the provided "quick retune" values will be applied to the transceiver to tune it according to a previous state retrieved via bladerf_get_quick_tune(). |
- Returns
- 0 on success, value from Error codes list on failure.
- Note
- If the underlying queue of scheduled retune requests becomes full, BLADERF_ERR_QUEUE_FULL will be returned. In this case, it should be possible to schedule a retune after the timestamp of one of the earlier requests occurs.