pub struct AdcClock { /* private fields */ }Expand description
A struct containing the clock configuration for the ADC peripheral
Implementations§
Source§impl AdcClock
impl AdcClock
Sourcepub unsafe fn new(caldiv: u8, div: u8) -> Self
pub unsafe fn new(caldiv: u8, div: u8) -> Self
Create the clock config for the ADC peripheral
The system clock is divided by caldiv during calibration or div
during normal operation.
During calibration the frequency of the ADC peripheral has to be 500 kHz
and during normal operation it can’t be higher than 30 MHz.
Sourcepub fn new_default() -> Self
pub fn new_default() -> Self
Create a new ADC clock config with the maximum sample rate
Assumes the internal oscillator runs at 12 MHz
Auto Trait Implementations§
impl Freeze for AdcClock
impl RefUnwindSafe for AdcClock
impl Send for AdcClock
impl Sync for AdcClock
impl Unpin for AdcClock
impl UnwindSafe for AdcClock
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