Enum stm32wlxx_hal::subghz::CurrentLim
source · #[repr(u8)]pub enum CurrentLim {
Milli25 = 0,
Milli50 = 1,
Milli100 = 2,
Milli200 = 3,
}
Expand description
Power-supply current limit.
Argument of PwrCtrl::set_current_lim
.
Variants§
Implementations§
source§impl CurrentLim
impl CurrentLim
sourcepub const fn as_milliamps(&self) -> u8
pub const fn as_milliamps(&self) -> u8
Get the SMPS drive value as milliamps.
Example
use stm32wlxx_hal::subghz::CurrentLim;
assert_eq!(CurrentLim::Milli25.as_milliamps(), 25);
assert_eq!(CurrentLim::Milli50.as_milliamps(), 50);
assert_eq!(CurrentLim::Milli100.as_milliamps(), 100);
assert_eq!(CurrentLim::Milli200.as_milliamps(), 200);
Trait Implementations§
source§impl Clone for CurrentLim
impl Clone for CurrentLim
source§fn clone(&self) -> CurrentLim
fn clone(&self) -> CurrentLim
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CurrentLim
impl Debug for CurrentLim
source§impl Default for CurrentLim
impl Default for CurrentLim
source§fn default() -> CurrentLim
fn default() -> CurrentLim
Returns the “default value” for a type. Read more
source§impl Ord for CurrentLim
impl Ord for CurrentLim
source§fn cmp(&self, other: &CurrentLim) -> Ordering
fn cmp(&self, other: &CurrentLim) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for CurrentLim
impl PartialEq for CurrentLim
source§fn eq(&self, other: &CurrentLim) -> bool
fn eq(&self, other: &CurrentLim) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CurrentLim
impl PartialOrd for CurrentLim
source§fn partial_cmp(&self, other: &CurrentLim) -> Option<Ordering>
fn partial_cmp(&self, other: &CurrentLim) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for CurrentLim
impl Eq for CurrentLim
impl StructuralEq for CurrentLim
impl StructuralPartialEq for CurrentLim
Auto Trait Implementations§
impl RefUnwindSafe for CurrentLim
impl Send for CurrentLim
impl Sync for CurrentLim
impl Unpin for CurrentLim
impl UnwindSafe for CurrentLim
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