Struct LEDC

Source
pub struct LEDC { /* private fields */ }
Expand description

LED Control PWM (Pulse Width Modulation)

Implementations§

Source§

impl LEDC

Source

pub const PTR: *const RegisterBlock = {0x500d3000 as *const ledc::RegisterBlock}

Pointer to the register block

Source

pub const fn ptr() -> *const RegisterBlock

Return the pointer to the register block

Source

pub unsafe fn steal() -> Self

Steal an instance of this peripheral

§Safety

Ensure that the new instance of the peripheral cannot be used in a way that may race with any existing instances, for example by only accessing read-only or write-only registers, or by consuming the original peripheral and using critical sections to coordinate access between multiple new instances.

Additionally, other software such as HALs may rely on only one peripheral instance existing to ensure memory safety; ensure no stolen instances are passed to such software.

Methods from Deref<Target = RegisterBlock>§

Source

pub fn ch(&self, n: usize) -> &CH

0x00..0xa0 - Cluster CH%s, containing CH?_CONF0, CH?_HPOINT, CH?_DUTY, CH?_CONF1, CH?_DUTY_R

Source

pub fn ch_iter(&self) -> impl Iterator<Item = &CH>

Iterator for array of: 0x00..0xa0 - Cluster CH%s, containing CH?_CONF0, CH?_HPOINT, CH?_DUTY, CH?_CONF1, CH?_DUTY_R

Source

pub fn timer(&self, n: usize) -> &TIMER

0xa0..0xc0 - Cluster TIMER%s, containing TIMER?_CONF, TIMER?_VALUE

Source

pub fn timer_iter(&self) -> impl Iterator<Item = &TIMER>

Iterator for array of: 0xa0..0xc0 - Cluster TIMER%s, containing TIMER?_CONF, TIMER?_VALUE

Source

pub fn int_raw(&self) -> &INT_RAW

0xc0 - Interrupt raw status register

Source

pub fn int_st(&self) -> &INT_ST

0xc4 - Interrupt masked status register

Source

pub fn int_ena(&self) -> &INT_ENA

0xc8 - Interrupt enable register

Source

pub fn int_clr(&self) -> &INT_CLR

0xcc - Interrupt clear register

Source

pub fn ch_gamma_conf(&self, n: usize) -> &CH_GAMMA_CONF

0x100..0x120 - Ledc ch%s gamma config register.

Source

pub fn ch_gamma_conf_iter(&self) -> impl Iterator<Item = &CH_GAMMA_CONF>

Iterator for array of: 0x100..0x120 - Ledc ch%s gamma config register.

Source

pub fn ch0_gamma_conf(&self) -> &CH_GAMMA_CONF

0x100 - Ledc ch0 gamma config register.

Source

pub fn ch1_gamma_conf(&self) -> &CH_GAMMA_CONF

0x104 - Ledc ch1 gamma config register.

Source

pub fn ch2_gamma_conf(&self) -> &CH_GAMMA_CONF

0x108 - Ledc ch2 gamma config register.

Source

pub fn ch3_gamma_conf(&self) -> &CH_GAMMA_CONF

0x10c - Ledc ch3 gamma config register.

Source

pub fn ch4_gamma_conf(&self) -> &CH_GAMMA_CONF

0x110 - Ledc ch4 gamma config register.

Source

pub fn ch5_gamma_conf(&self) -> &CH_GAMMA_CONF

0x114 - Ledc ch5 gamma config register.

Source

pub fn ch6_gamma_conf(&self) -> &CH_GAMMA_CONF

0x118 - Ledc ch6 gamma config register.

Source

pub fn ch7_gamma_conf(&self) -> &CH_GAMMA_CONF

0x11c - Ledc ch7 gamma config register.

Source

pub fn evt_task_en0(&self) -> &EVT_TASK_EN0

0x120 - Ledc event task enable bit register0.

Source

pub fn evt_task_en1(&self) -> &EVT_TASK_EN1

0x124 - Ledc event task enable bit register1.

Source

pub fn evt_task_en2(&self) -> &EVT_TASK_EN2

0x128 - Ledc event task enable bit register2.

Source

pub fn timer_cmp(&self, n: usize) -> &TIMER_CMP

0x140..0x150 - Ledc timer%s compare value register.

Source

pub fn timer_cmp_iter(&self) -> impl Iterator<Item = &TIMER_CMP>

Iterator for array of: 0x140..0x150 - Ledc timer%s compare value register.

Source

pub fn timer0_cmp(&self) -> &TIMER_CMP

0x140 - Ledc timer0 compare value register.

Source

pub fn timer1_cmp(&self) -> &TIMER_CMP

0x144 - Ledc timer1 compare value register.

Source

pub fn timer2_cmp(&self) -> &TIMER_CMP

0x148 - Ledc timer2 compare value register.

Source

pub fn timer3_cmp(&self) -> &TIMER_CMP

0x14c - Ledc timer3 compare value register.

Source

pub fn timer_cnt_cap(&self, n: usize) -> &TIMER_CNT_CAP

0x150..0x160 - Ledc timer%s captured count value register.

Source

pub fn timer_cnt_cap_iter(&self) -> impl Iterator<Item = &TIMER_CNT_CAP>

Iterator for array of: 0x150..0x160 - Ledc timer%s captured count value register.

Source

pub fn timer0_cnt_cap(&self) -> &TIMER_CNT_CAP

0x150 - Ledc timer0 captured count value register.

Source

pub fn timer1_cnt_cap(&self) -> &TIMER_CNT_CAP

0x154 - Ledc timer1 captured count value register.

Source

pub fn timer2_cnt_cap(&self) -> &TIMER_CNT_CAP

0x158 - Ledc timer2 captured count value register.

Source

pub fn timer3_cnt_cap(&self) -> &TIMER_CNT_CAP

0x15c - Ledc timer3 captured count value register.

Source

pub fn conf(&self) -> &CONF

0x170 - LEDC global configuration register

Source

pub fn date(&self) -> &DATE

0x174 - Version control register

Trait Implementations§

Source§

impl Debug for LEDC

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for LEDC

Source§

type Target = RegisterBlock

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Send for LEDC

Auto Trait Implementations§

§

impl Freeze for LEDC

§

impl RefUnwindSafe for LEDC

§

impl !Sync for LEDC

§

impl Unpin for LEDC

§

impl UnwindSafe for LEDC

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.