pub enum Peripheral {
Show 17 variants
Uart0,
Uart1,
Uart2,
I2c0,
I2c1,
Spi0,
Spi1,
Pwm,
Timer,
Lsadc,
Tsensor,
I2s,
Dma,
Sdma,
Sfc,
Trng,
SecurityGroup,
}Expand description
Enumeration of all peripheral clocks.
Variants§
Implementations§
Source§impl Peripheral
impl Peripheral
Sourcepub fn cken_info(&self) -> Option<(u8, u8)>
pub fn cken_info(&self) -> Option<(u8, u8)>
The CLDO_CRG clock-gate register index (0 = CKEN_CTL0, 1 = CKEN_CTL1)
and bit position for this peripheral.
The CLDO_CRG clock-gate register index (0 = CKEN_CTL0, 1 = CKEN_CTL1)
and bit position for this peripheral, or None if the SDK does not
individually gate it (it relies on the reset-default clock; no bit is
attested by the SVD or porting code).
PWM occupies 9 contiguous gates (CKEN_CTL0 bits 2..=10); this returns its
base bit (2). I2S returns its clk gate (bit 12); it also has a bus gate at
bit 11. See the module docs for the provenance of each.
Trait Implementations§
Source§impl Clone for Peripheral
impl Clone for Peripheral
Source§fn clone(&self) -> Peripheral
fn clone(&self) -> Peripheral
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 Peripheral
Source§impl Debug for Peripheral
impl Debug for Peripheral
impl Eq for Peripheral
Source§impl PartialEq for Peripheral
impl PartialEq for Peripheral
Source§fn eq(&self, other: &Peripheral) -> bool
fn eq(&self, other: &Peripheral) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Peripheral
Auto Trait Implementations§
impl Freeze for Peripheral
impl RefUnwindSafe for Peripheral
impl Send for Peripheral
impl Sync for Peripheral
impl Unpin for Peripheral
impl UnsafeUnpin for Peripheral
impl UnwindSafe for Peripheral
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