Enum stm32wlxx_hal::subghz::TcxoTrim
source · #[repr(u8)]pub enum TcxoTrim {
Volts1pt6 = 0,
Volts1pt7 = 1,
Volts1pt8 = 2,
Volts2pt2 = 3,
Volts2pt4 = 4,
Volts2pt7 = 5,
Volts3pt0 = 6,
Volts3pt3 = 7,
}
Expand description
TCXO trim.
Note: To use VDDTCXO, the VDDRF supply must be at
least + 200 mV higher than the selected TcxoTrim
voltage level.
Used by TcxoMode
.
Variants§
Volts1pt6 = 0
1.6V
Volts1pt7 = 1
1.7V
Volts1pt8 = 2
1.8V
Volts2pt2 = 3
2.2V
Volts2pt4 = 4
2.4V
Volts2pt7 = 5
2.7V
Volts3pt0 = 6
3.0V
Volts3pt3 = 7
3.3V
Implementations§
source§impl TcxoTrim
impl TcxoTrim
sourcepub const fn as_millivolts(&self) -> u16
pub const fn as_millivolts(&self) -> u16
Get the value of the TCXO trim in millivolts.
Example
use stm32wlxx_hal::subghz::TcxoTrim;
assert_eq!(TcxoTrim::Volts1pt6.as_millivolts(), 1600);
assert_eq!(TcxoTrim::Volts1pt7.as_millivolts(), 1700);
assert_eq!(TcxoTrim::Volts1pt8.as_millivolts(), 1800);
assert_eq!(TcxoTrim::Volts2pt2.as_millivolts(), 2200);
assert_eq!(TcxoTrim::Volts2pt4.as_millivolts(), 2400);
assert_eq!(TcxoTrim::Volts2pt7.as_millivolts(), 2700);
assert_eq!(TcxoTrim::Volts3pt0.as_millivolts(), 3000);
assert_eq!(TcxoTrim::Volts3pt3.as_millivolts(), 3300);
Trait Implementations§
source§impl Ord for TcxoTrim
impl Ord for TcxoTrim
source§impl PartialEq for TcxoTrim
impl PartialEq for TcxoTrim
source§impl PartialOrd for TcxoTrim
impl PartialOrd for TcxoTrim
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 TcxoTrim
impl Eq for TcxoTrim
impl StructuralEq for TcxoTrim
impl StructuralPartialEq for TcxoTrim
Auto Trait Implementations§
impl RefUnwindSafe for TcxoTrim
impl Send for TcxoTrim
impl Sync for TcxoTrim
impl Unpin for TcxoTrim
impl UnwindSafe for TcxoTrim
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