Struct stabilizer::hardware::pounder::PounderDevices
source · pub struct PounderDevices { /* private fields */ }
Expand description
A structure containing implementation for Pounder hardware.
Implementations§
source§impl PounderDevices
impl PounderDevices
sourcepub fn new(
i2c: I2c1Proxy,
attenuator_spi: Spi<SPI1, Enabled, u8>,
pwr: (AdcChannel<'static, ADC1, PF11<Analog>>, AdcChannel<'static, ADC2, PF14<Analog>>),
aux_adc: (AdcChannel<'static, ADC3, PF3<Analog>>, AdcChannel<'static, ADC3, PF4<Analog>>)
) -> Result<Self, Error>
pub fn new( i2c: I2c1Proxy, attenuator_spi: Spi<SPI1, Enabled, u8>, pwr: (AdcChannel<'static, ADC1, PF11<Analog>>, AdcChannel<'static, ADC2, PF14<Analog>>), aux_adc: (AdcChannel<'static, ADC3, PF3<Analog>>, AdcChannel<'static, ADC3, PF4<Analog>>) ) -> Result<Self, Error>
Construct and initialize pounder-specific hardware.
Args:
i2c
- A Proxy to I2C1.attenuator_spi
- A SPI interface to control digital attenuators.pwr
- The ADC channels to measure the IN0/1 input power.aux_adc
- The ADC channels to measure the ADC0/1 auxiliary input.
sourcepub fn sample_aux_adc(&mut self, channel: Channel) -> Result<f32, Error>
pub fn sample_aux_adc(&mut self, channel: Channel) -> Result<f32, Error>
Sample one of the two auxiliary ADC channels associated with the respective RF input channel.
sourcepub fn set_ext_clk(&mut self, enabled: bool) -> Result<(), Error>
pub fn set_ext_clk(&mut self, enabled: bool) -> Result<(), Error>
Select external reference clock input.
sourcepub fn reset_dds(&mut self) -> Result<(), Error>
pub fn reset_dds(&mut self) -> Result<(), Error>
Reset the DDS via the GPIO extender (Pounder v1.2 and later)
sourcepub fn temperature(&mut self) -> Result<f32, Error>
pub fn temperature(&mut self) -> Result<f32, Error>
Read the temperature reported by the LM75 temperature sensor on Pounder in deg C.
Trait Implementations§
source§impl AttenuatorInterface for PounderDevices
impl AttenuatorInterface for PounderDevices
source§fn reset_attenuators(&mut self) -> Result<(), Error>
fn reset_attenuators(&mut self) -> Result<(), Error>
Reset all of the attenuators to a power-on default state.
source§fn latch_attenuator(&mut self, channel: Channel) -> Result<(), Error>
fn latch_attenuator(&mut self, channel: Channel) -> Result<(), Error>
Latch a configuration into a digital attenuator.
Args:
channel
- The attenuator channel to latch.
source§fn transfer_attenuators(&mut self, channels: &mut [u8; 4]) -> Result<(), Error>
fn transfer_attenuators(&mut self, channels: &mut [u8; 4]) -> Result<(), Error>
Read the raw attenuation codes stored in the attenuator shift registers.
Args:
channels
- A 4 byte slice to be shifted into the attenuators and to contain the data shifted out.
source§fn set_attenuation(
&mut self,
channel: Channel,
attenuation: f32
) -> Result<f32, Error>
fn set_attenuation( &mut self, channel: Channel, attenuation: f32 ) -> Result<f32, Error>
Set the attenuation of a single channel. Read more
source§fn get_attenuation(&mut self, channel: Channel) -> Result<f32, Error>
fn get_attenuation(&mut self, channel: Channel) -> Result<f32, Error>
Get the attenuation of a channel. Read more
fn validate(attenuation: f32) -> Result<f32, Error>
source§impl PowerMeasurementInterface for PounderDevices
impl PowerMeasurementInterface for PounderDevices
Auto Trait Implementations§
impl Freeze for PounderDevices
impl !RefUnwindSafe for PounderDevices
impl Send for PounderDevices
impl !Sync for PounderDevices
impl Unpin for PounderDevices
impl !UnwindSafe for PounderDevices
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more