Expand description
ad9361
: Bindings to the AD9361 part of the Analog Devices Inc. no-OS
library.
§Usage
use ad9361_rs::{Ad9361, Ad9361InitParam};
use embedded_hal::blocking::spi::Transfer;
use embedded_hal::digital::v2::OutputPin;
use embedded_hal::blocking::delay::{DelayMs, DelayUs};
fn example(spi: impl Transfer<u8>,
delay: impl DelayMs<u32> + DelayUs<u32>,
reset_n: impl OutputPin)
{
let parameters: Ad9361InitParam = Default::default();
let heap = Vec::with_capacity(540);
let mut ad9361 = Ad9361::new(spi, delay, Some(reset_n), heap); // ad9361 must not be moved after this point
ad9361.init(parameters).unwrap();
let _temperature = ad9361.get_temperature().unwrap();
}
§#[no_std]
To use the crate in a no-std enviroment, specify default-features = false
in Cargo.toml. You will then need to specify one of the supported device features.
ad9361_device
ad9364_device
ad9363a_device
ad9361-rs = { default-features = false, features = ["ad9364_device"] }
The build process for this crate requires a C compiler. When cross-compiling, you will need to make sure you have a suitable compiler installed. If necessary the cc crate supports external configuration via enviroment variables
Structs§
- Ad9361
- An AD9361 RF PHY
- Ad9361
Init Param - Parameters used to configure the AD9361 RF PHY
- Ad9361
RxFir - Parameters used to configure the Rx FIR filter
- Ad9361
TxFir - Parameters used to configure the Tx FIR filter
Enums§
- Bist
Mode - Built-In Self Test (BIST) mode
- Ensm
State - Enable State Machine (ENSM) state.
- Internal
ExternalLO - Internal / External LO selection
- LOPower
Status - Tx Local Oscillator power down
- Loopback
Mode - Loopback mode. When enabled, loopback (AD9361 internal) TX->RX
- RfGain
Control Mode - RF Gain Control Mode
- RxRf
Port Selection - RX RF Port Selection
- TxRf
Port Selection - TX RF Port Selection