pub enum TcxoVoltage {
V1_6,
V1_7,
V1_8,
V2_2,
V2_4,
V2_7,
V3_0,
V3_3,
}Expand description
The voltage DIO3 supplies a TCXO with, from Table 13-35.
Variants§
V1_6
1.6 V (0x00).
V1_7
1.7 V (0x01).
V1_8
1.8 V (0x02).
V2_2
2.2 V (0x03).
V2_4
2.4 V (0x04).
V2_7
2.7 V (0x05).
V3_0
3.0 V (0x06).
V3_3
3.3 V (0x07).
Implementations§
Source§impl TcxoVoltage
impl TcxoVoltage
Sourcepub const fn from_millivolts(millivolts: u16) -> Option<TcxoVoltage>
pub const fn from_millivolts(millivolts: u16) -> Option<TcxoVoltage>
Names the TCXO voltage DIO3 supplies at a number of millivolts.
§Arguments
millivolts- the supply voltage, such as1700for 1.7 V.
§Returns
The voltage, or None for one DIO3 cannot supply.
§Examples
use pamoja_radios::sx126x::config::TcxoVoltage;
assert_eq!(TcxoVoltage::from_millivolts(1700), Some(TcxoVoltage::V1_7));
assert_eq!(TcxoVoltage::from_millivolts(1900), None);Trait Implementations§
Source§impl Clone for TcxoVoltage
impl Clone for TcxoVoltage
Source§fn clone(&self) -> TcxoVoltage
fn clone(&self) -> TcxoVoltage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TcxoVoltage
Source§impl Debug for TcxoVoltage
impl Debug for TcxoVoltage
impl Eq for TcxoVoltage
Source§impl Hash for TcxoVoltage
impl Hash for TcxoVoltage
Source§impl PartialEq for TcxoVoltage
impl PartialEq for TcxoVoltage
Source§fn eq(&self, other: &TcxoVoltage) -> bool
fn eq(&self, other: &TcxoVoltage) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TcxoVoltage
Auto Trait Implementations§
impl Freeze for TcxoVoltage
impl RefUnwindSafe for TcxoVoltage
impl Send for TcxoVoltage
impl Sync for TcxoVoltage
impl Unpin for TcxoVoltage
impl UnsafeUnpin for TcxoVoltage
impl UnwindSafe for TcxoVoltage
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