Function stabilizer::hardware::setup::setup
source · pub fn setup<C, const Y: usize>(
core: CorePeripherals,
device: Peripherals,
clock: SystemTimer,
batch_size: usize,
sample_ticks: u32
) -> (StabilizerDevices<C, Y>, Option<PounderDevices>)where
C: Settings<Y> + for<'d> JsonCoreSlash<'d, Y> + AppSettings,
Expand description
Configure the stabilizer hardware for operation.
§Note
Refer to design_parameters::TIMER_FREQUENCY to determine the frequency of the sampling timer.
§Args
core
- The cortex-m peripherals.device
- The microcontroller peripherals to be configured.clock
- ASystemTimer
implementingClock
.batch_size
- The size of each ADC/DAC batch.sample_ticks
- The number of timer ticks between each sample.
§Returns
(stabilizer, pounder) where stabilizer
is a StabilizerDevices
structure containing all
stabilizer hardware interfaces in a disabled state. pounder
is an Option
containing
Some(devices)
if pounder is detected, where devices
is a PounderDevices
structure
containing all of the pounder hardware interfaces in a disabled state.