pub struct LEDC { /* private fields */ }
Expand description
LED Control PWM (Pulse Width Modulation)
Implementations§
Source§impl LEDC
impl LEDC
Sourcepub const PTR: *const RegisterBlock = {0x500d3000 as *const ledc::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x500d3000 as *const ledc::RegisterBlock}
Pointer to the register block
Sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
Sourcepub unsafe fn steal() -> Self
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>§
Sourcepub fn ch(&self, n: usize) -> &CH
pub fn ch(&self, n: usize) -> &CH
0x00..0xa0 - Cluster CH%s, containing CH?_CONF0, CH?_HPOINT, CH?_DUTY, CH?_CONF1, CH?_DUTY_R
Sourcepub fn ch_iter(&self) -> impl Iterator<Item = &CH>
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
Sourcepub fn timer(&self, n: usize) -> &TIMER
pub fn timer(&self, n: usize) -> &TIMER
0xa0..0xc0 - Cluster TIMER%s, containing TIMER?_CONF, TIMER?_VALUE
Sourcepub fn timer_iter(&self) -> impl Iterator<Item = &TIMER>
pub fn timer_iter(&self) -> impl Iterator<Item = &TIMER>
Iterator for array of: 0xa0..0xc0 - Cluster TIMER%s, containing TIMER?_CONF, TIMER?_VALUE
Sourcepub fn ch_gamma_conf(&self, n: usize) -> &CH_GAMMA_CONF
pub fn ch_gamma_conf(&self, n: usize) -> &CH_GAMMA_CONF
0x100..0x120 - Ledc ch%s gamma config register.
Sourcepub fn ch_gamma_conf_iter(&self) -> impl Iterator<Item = &CH_GAMMA_CONF>
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.
Sourcepub fn ch0_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch0_gamma_conf(&self) -> &CH_GAMMA_CONF
0x100 - Ledc ch0 gamma config register.
Sourcepub fn ch1_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch1_gamma_conf(&self) -> &CH_GAMMA_CONF
0x104 - Ledc ch1 gamma config register.
Sourcepub fn ch2_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch2_gamma_conf(&self) -> &CH_GAMMA_CONF
0x108 - Ledc ch2 gamma config register.
Sourcepub fn ch3_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch3_gamma_conf(&self) -> &CH_GAMMA_CONF
0x10c - Ledc ch3 gamma config register.
Sourcepub fn ch4_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch4_gamma_conf(&self) -> &CH_GAMMA_CONF
0x110 - Ledc ch4 gamma config register.
Sourcepub fn ch5_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch5_gamma_conf(&self) -> &CH_GAMMA_CONF
0x114 - Ledc ch5 gamma config register.
Sourcepub fn ch6_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch6_gamma_conf(&self) -> &CH_GAMMA_CONF
0x118 - Ledc ch6 gamma config register.
Sourcepub fn ch7_gamma_conf(&self) -> &CH_GAMMA_CONF
pub fn ch7_gamma_conf(&self) -> &CH_GAMMA_CONF
0x11c - Ledc ch7 gamma config register.
Sourcepub fn evt_task_en0(&self) -> &EVT_TASK_EN0
pub fn evt_task_en0(&self) -> &EVT_TASK_EN0
0x120 - Ledc event task enable bit register0.
Sourcepub fn evt_task_en1(&self) -> &EVT_TASK_EN1
pub fn evt_task_en1(&self) -> &EVT_TASK_EN1
0x124 - Ledc event task enable bit register1.
Sourcepub fn evt_task_en2(&self) -> &EVT_TASK_EN2
pub fn evt_task_en2(&self) -> &EVT_TASK_EN2
0x128 - Ledc event task enable bit register2.
Sourcepub fn timer_cmp(&self, n: usize) -> &TIMER_CMP
pub fn timer_cmp(&self, n: usize) -> &TIMER_CMP
0x140..0x150 - Ledc timer%s compare value register.
Sourcepub fn timer_cmp_iter(&self) -> impl Iterator<Item = &TIMER_CMP>
pub fn timer_cmp_iter(&self) -> impl Iterator<Item = &TIMER_CMP>
Iterator for array of: 0x140..0x150 - Ledc timer%s compare value register.
Sourcepub fn timer0_cmp(&self) -> &TIMER_CMP
pub fn timer0_cmp(&self) -> &TIMER_CMP
0x140 - Ledc timer0 compare value register.
Sourcepub fn timer1_cmp(&self) -> &TIMER_CMP
pub fn timer1_cmp(&self) -> &TIMER_CMP
0x144 - Ledc timer1 compare value register.
Sourcepub fn timer2_cmp(&self) -> &TIMER_CMP
pub fn timer2_cmp(&self) -> &TIMER_CMP
0x148 - Ledc timer2 compare value register.
Sourcepub fn timer3_cmp(&self) -> &TIMER_CMP
pub fn timer3_cmp(&self) -> &TIMER_CMP
0x14c - Ledc timer3 compare value register.
Sourcepub fn timer_cnt_cap(&self, n: usize) -> &TIMER_CNT_CAP
pub fn timer_cnt_cap(&self, n: usize) -> &TIMER_CNT_CAP
0x150..0x160 - Ledc timer%s captured count value register.
Sourcepub fn timer_cnt_cap_iter(&self) -> impl Iterator<Item = &TIMER_CNT_CAP>
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.
Sourcepub fn timer0_cnt_cap(&self) -> &TIMER_CNT_CAP
pub fn timer0_cnt_cap(&self) -> &TIMER_CNT_CAP
0x150 - Ledc timer0 captured count value register.
Sourcepub fn timer1_cnt_cap(&self) -> &TIMER_CNT_CAP
pub fn timer1_cnt_cap(&self) -> &TIMER_CNT_CAP
0x154 - Ledc timer1 captured count value register.
Sourcepub fn timer2_cnt_cap(&self) -> &TIMER_CNT_CAP
pub fn timer2_cnt_cap(&self) -> &TIMER_CNT_CAP
0x158 - Ledc timer2 captured count value register.
Sourcepub fn timer3_cnt_cap(&self) -> &TIMER_CNT_CAP
pub fn timer3_cnt_cap(&self) -> &TIMER_CNT_CAP
0x15c - Ledc timer3 captured count value register.