Struct esp32c6::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 = {0x60007000 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..0x78 - 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..0x78 - 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 - Raw interrupt status

source

pub fn int_st(&self) -> &INT_ST

0xc4 - Masked interrupt status

source

pub fn int_ena(&self) -> &INT_ENA

0xc8 - Interrupt enable bits

source

pub fn int_clr(&self) -> &INT_CLR

0xcc - Interrupt clear bits

source

pub fn ch_gamma_wr(&self, n: usize) -> &CH_GAMMA_WR

0x100..0x118 - Ledc ch%s gamma ram write register.

source

pub fn ch_gamma_wr_iter(&self) -> impl Iterator<Item = &CH_GAMMA_WR>

Iterator for array of: 0x100..0x118 - Ledc ch%s gamma ram write register.

source

pub fn ch0_gamma_wr(&self) -> &CH_GAMMA_WR

0x100 - Ledc ch0 gamma ram write register.

source

pub fn ch1_gamma_wr(&self) -> &CH_GAMMA_WR

0x110 - Ledc ch1 gamma ram write register.

source

pub fn ch2_gamma_wr(&self) -> &CH_GAMMA_WR

0x120 - Ledc ch2 gamma ram write register.

source

pub fn ch3_gamma_wr(&self) -> &CH_GAMMA_WR

0x130 - Ledc ch3 gamma ram write register.

source

pub fn ch4_gamma_wr(&self) -> &CH_GAMMA_WR

0x140 - Ledc ch4 gamma ram write register.

source

pub fn ch5_gamma_wr(&self) -> &CH_GAMMA_WR

0x150 - Ledc ch5 gamma ram write register.

source

pub fn ch_gamma_wr_addr(&self, n: usize) -> &CH_GAMMA_WR_ADDR

0x104..0x11c - Ledc ch%s gamma ram write address register.

source

pub fn ch_gamma_wr_addr_iter(&self) -> impl Iterator<Item = &CH_GAMMA_WR_ADDR>

Iterator for array of: 0x104..0x11c - Ledc ch%s gamma ram write address register.

source

pub fn ch0_gamma_wr_addr(&self) -> &CH_GAMMA_WR_ADDR

0x104 - Ledc ch0 gamma ram write address register.

source

pub fn ch1_gamma_wr_addr(&self) -> &CH_GAMMA_WR_ADDR

0x114 - Ledc ch1 gamma ram write address register.

source

pub fn ch2_gamma_wr_addr(&self) -> &CH_GAMMA_WR_ADDR

0x124 - Ledc ch2 gamma ram write address register.

source

pub fn ch3_gamma_wr_addr(&self) -> &CH_GAMMA_WR_ADDR

0x134 - Ledc ch3 gamma ram write address register.

source

pub fn ch4_gamma_wr_addr(&self) -> &CH_GAMMA_WR_ADDR

0x144 - Ledc ch4 gamma ram write address register.

source

pub fn ch5_gamma_wr_addr(&self) -> &CH_GAMMA_WR_ADDR

0x154 - Ledc ch5 gamma ram write address register.

source

pub fn ch_gamma_rd_addr(&self, n: usize) -> &CH_GAMMA_RD_ADDR

0x108..0x120 - Ledc ch%s gamma ram read address register.

source

pub fn ch_gamma_rd_addr_iter(&self) -> impl Iterator<Item = &CH_GAMMA_RD_ADDR>

Iterator for array of: 0x108..0x120 - Ledc ch%s gamma ram read address register.

source

pub fn ch0_gamma_rd_addr(&self) -> &CH_GAMMA_RD_ADDR

0x108 - Ledc ch0 gamma ram read address register.

source

pub fn ch1_gamma_rd_addr(&self) -> &CH_GAMMA_RD_ADDR

0x118 - Ledc ch1 gamma ram read address register.

source

pub fn ch2_gamma_rd_addr(&self) -> &CH_GAMMA_RD_ADDR

0x128 - Ledc ch2 gamma ram read address register.

source

pub fn ch3_gamma_rd_addr(&self) -> &CH_GAMMA_RD_ADDR

0x138 - Ledc ch3 gamma ram read address register.

source

pub fn ch4_gamma_rd_addr(&self) -> &CH_GAMMA_RD_ADDR

0x148 - Ledc ch4 gamma ram read address register.

source

pub fn ch5_gamma_rd_addr(&self) -> &CH_GAMMA_RD_ADDR

0x158 - Ledc ch5 gamma ram read address register.

source

pub fn ch_gamma_rd_data(&self, n: usize) -> &CH_GAMMA_RD_DATA

0x10c..0x124 - Ledc ch%s gamma ram read data register.

source

pub fn ch_gamma_rd_data_iter(&self) -> impl Iterator<Item = &CH_GAMMA_RD_DATA>

Iterator for array of: 0x10c..0x124 - Ledc ch%s gamma ram read data register.

source

pub fn ch0_gamma_rd_data(&self) -> &CH_GAMMA_RD_DATA

0x10c - Ledc ch0 gamma ram read data register.

source

pub fn ch1_gamma_rd_data(&self) -> &CH_GAMMA_RD_DATA

0x11c - Ledc ch1 gamma ram read data register.

source

pub fn ch2_gamma_rd_data(&self) -> &CH_GAMMA_RD_DATA

0x12c - Ledc ch2 gamma ram read data register.

source

pub fn ch3_gamma_rd_data(&self) -> &CH_GAMMA_RD_DATA

0x13c - Ledc ch3 gamma ram read data register.

source

pub fn ch4_gamma_rd_data(&self) -> &CH_GAMMA_RD_DATA

0x14c - Ledc ch4 gamma ram read data register.

source

pub fn ch5_gamma_rd_data(&self) -> &CH_GAMMA_RD_DATA

0x15c - Ledc ch5 gamma ram read data register.

source

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

0x180..0x198 - Ledc ch%s gamma config register.

source

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

Iterator for array of: 0x180..0x198 - Ledc ch%s gamma config register.

source

pub fn ch0_gamma_conf(&self) -> &CH_GAMMA_CONF

0x180 - Ledc ch0 gamma config register.

source

pub fn ch1_gamma_conf(&self) -> &CH_GAMMA_CONF

0x184 - Ledc ch1 gamma config register.

source

pub fn ch2_gamma_conf(&self) -> &CH_GAMMA_CONF

0x188 - Ledc ch2 gamma config register.

source

pub fn ch3_gamma_conf(&self) -> &CH_GAMMA_CONF

0x18c - Ledc ch3 gamma config register.

source

pub fn ch4_gamma_conf(&self) -> &CH_GAMMA_CONF

0x190 - Ledc ch4 gamma config register.

source

pub fn ch5_gamma_conf(&self) -> &CH_GAMMA_CONF

0x194 - Ledc ch5 gamma config register.

source

pub fn evt_task_en0(&self) -> &EVT_TASK_EN0

0x1a0 - Ledc event task enable bit register0.

source

pub fn evt_task_en1(&self) -> &EVT_TASK_EN1

0x1a4 - Ledc event task enable bit register1.

source

pub fn evt_task_en2(&self) -> &EVT_TASK_EN2

0x1a8 - Ledc event task enable bit register2.

source

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

0x1b0..0x1c0 - Ledc timer%s compare value register.

source

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

Iterator for array of: 0x1b0..0x1c0 - Ledc timer%s compare value register.

source

pub fn timer0_cmp(&self) -> &TIMER_CMP

0x1b0 - Ledc timer0 compare value register.

source

pub fn timer1_cmp(&self) -> &TIMER_CMP

0x1b4 - Ledc timer1 compare value register.

source

pub fn timer2_cmp(&self) -> &TIMER_CMP

0x1b8 - Ledc timer2 compare value register.

source

pub fn timer3_cmp(&self) -> &TIMER_CMP

0x1bc - Ledc timer3 compare value register.

source

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

0x1c0..0x1d0 - Ledc timer%s count value capture register.

source

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

Iterator for array of: 0x1c0..0x1d0 - Ledc timer%s count value capture register.

source

pub fn timer0_cnt_cap(&self) -> &TIMER_CNT_CAP

0x1c0 - Ledc timer0 count value capture register.

source

pub fn timer1_cnt_cap(&self) -> &TIMER_CNT_CAP

0x1c4 - Ledc timer1 count value capture register.

source

pub fn timer2_cnt_cap(&self) -> &TIMER_CNT_CAP

0x1c8 - Ledc timer2 count value capture register.

source

pub fn timer3_cnt_cap(&self) -> &TIMER_CNT_CAP

0x1cc - Ledc timer3 count value capture register.

source

pub fn conf(&self) -> &CONF

0x1f0 - Global ledc configuration register

source

pub fn date(&self) -> &DATE

0x1fc - 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

§

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<T, U> TryFrom<U> for T
where U: Into<T>,

§

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>,

§

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.