#[non_exhaustive]pub struct Config { /* private fields */ }Expand description
Brownout detector configuration.
Implementations§
Source§impl Config
impl Config
Sourcepub fn with_threshold(self, threshold: Threshold) -> Self
pub fn with_threshold(self, threshold: Threshold) -> Self
Assign the given value to the threshold field.
Sourcepub fn threshold(&self) -> Threshold
pub fn threshold(&self) -> Threshold
The supply voltage below which the detector trips.
Defaults to Threshold::Level7.
Sourcepub fn with_reset_level(self, reset_level: ResetLevel) -> Self
pub fn with_reset_level(self, reset_level: ResetLevel) -> Self
Assign the given value to the reset_level field.
Sourcepub fn reset_level(&self) -> ResetLevel
pub fn reset_level(&self) -> ResetLevel
What the detector resets when it trips.
Defaults to ResetLevel::System.
Sourcepub fn with_flash_power_down(self, flash_power_down: bool) -> Self
pub fn with_flash_power_down(self, flash_power_down: bool) -> Self
Assign the given value to the flash_power_down field.
Sourcepub fn flash_power_down(&self) -> bool
pub fn flash_power_down(&self) -> bool
Power down the flash while the supply is below the threshold.
Defaults to true.
Sourcepub fn with_rf_power_down(self, rf_power_down: bool) -> Self
pub fn with_rf_power_down(self, rf_power_down: bool) -> Self
Assign the given value to the rf_power_down field.
Sourcepub fn rf_power_down(&self) -> bool
pub fn rf_power_down(&self) -> bool
Power down the RF circuits while the supply is below the threshold.
Defaults to true.
Trait Implementations§
impl Copy for Config
Available on crate feature
unstable only.impl Eq for Config
Available on crate feature
unstable only.impl StructuralPartialEq for Config
Available on crate feature
unstable only.Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)