Struct airspy::Airspy
[−]
[src]
pub struct Airspy { /* fields omitted */ }
Store a reference to an opened Airspy device.
Methods
impl Airspy
[src]
fn new() -> Result<Airspy>
Try to open the next available Airspy device.
fn from_serial(serial_number: u64) -> Result<Airspy>
Try to open a specific Airspy device by serial number.
fn get_sample_rates(&mut self) -> Result<Vec<u32>>
Get available sample rates for this Airspy.
fn set_sample_rate(&mut self, target_rate: u32) -> Result<()>
Set this Airspy's sample rate to a specific rate.
This rate must be in the available rates or an error is returned.
fn start_rx<T>(&mut self, sender: Sender<Vec<T>>) -> Result<()> where
T: SampleType,
T: SampleType,
Start RX streaming from the Airspy.
The given channel will be sent Vec
T is used to set the sample type and may be IQ
fn is_streaming(&mut self) -> bool
Check if the Airspy is currently streaming.
fn si5351c_write(&mut self, register: u8, value: u8) -> Result<()>
Write a register on the Si5351C
fn si5351c_read(&mut self, register: u8) -> Result<u8>
Read a register on the Si5351C
fn r820t_write(&mut self, register: u8, value: u8) -> Result<()>
Write a register on the R820t
fn r820t_read(&mut self, register: u8) -> Result<u8>
Read a register on the R820t
fn gpio_write(&mut self, port: GPIOPort, pin: GPIOPin, val: bool) -> Result<()>
Write a GPIO port:pin to val
, false to clear or true to set.
fn gpio_read(&mut self, port: GPIOPort, pin: GPIOPin) -> Result<bool>
Read a GPIO port:pin
fn gpio_set_direction(
&mut self,
port: GPIOPort,
pin: GPIOPin,
dir: GPIODirection
) -> Result<()>
&mut self,
port: GPIOPort,
pin: GPIOPin,
dir: GPIODirection
) -> Result<()>
Set a GPIO port:pin direction.
fn gpio_get_direction(
&mut self,
port: GPIOPort,
pin: GPIOPin
) -> Result<GPIODirection>
&mut self,
port: GPIOPort,
pin: GPIOPin
) -> Result<GPIODirection>
Get a GPIO port:pin direction.
fn get_board_id(&mut self) -> Result<&str>
Get the Airspy board type.
fn get_version(&mut self) -> Result<String>
Get the Airspy firmware version number.
fn get_partid_serial(&mut self) -> Result<PartID>
Get the Airspy part ID and serial number.
fn set_freq(&mut self, freq: u32) -> Result<()>
Set Airspy centre frequency, freq
24000000 to 1750000000 (in Hz)
fn set_lna_gain(&mut self, gain: u8) -> Result<()>
Set LNA gain, 0 to 15dB
fn set_mixer_gain(&mut self, gain: u8) -> Result<()>
Set mixer gain, 0 to 15dB
fn set_vga_gain(&mut self, gain: u8) -> Result<()>
Set VGA gain, 0 to 15dB
fn set_lna_agc(&mut self, enable: bool) -> Result<()>
Enable/disable LNA AGC
fn set_mixer_agc(&mut self, enable: bool) -> Result<()>
Enable/disable mixer AGC
fn set_rf_bias(&mut self, enable: bool) -> Result<()>
Enable/disable RF bias voltage
Trait Implementations
impl Drop for Airspy
[src]
Ensure whenever the Airspy goes out of scope it is closed.