pub struct LEDC { /* private fields */ }
Expand description
LED Control PWM (Pulse Width Modulation)
Implementations§
source§impl LEDC
impl LEDC
sourcepub const PTR: *const RegisterBlock = {0x60019000 as *const ledc::RegisterBlock}
pub const PTR: *const RegisterBlock = {0x60019000 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_conf0_iter(&self) -> impl Iterator<Item = &CH_CONF0>
pub fn ch_conf0_iter(&self) -> impl Iterator<Item = &CH_CONF0>
Iterator for array of: 0x00..0x18 - LEDC_LSCH%s_CONF%s.
sourcepub fn ch_hpoint_iter(&self) -> impl Iterator<Item = &CH_HPOINT>
pub fn ch_hpoint_iter(&self) -> impl Iterator<Item = &CH_HPOINT>
Iterator for array of: 0x04..0x1c - LEDC_LSCH%s_HPOINT.
sourcepub fn ch0_hpoint(&self) -> &CH_HPOINT
pub fn ch0_hpoint(&self) -> &CH_HPOINT
0x04 - LEDC_LSCH0_HPOINT.
sourcepub fn ch1_hpoint(&self) -> &CH_HPOINT
pub fn ch1_hpoint(&self) -> &CH_HPOINT
0x18 - LEDC_LSCH1_HPOINT.
sourcepub fn ch2_hpoint(&self) -> &CH_HPOINT
pub fn ch2_hpoint(&self) -> &CH_HPOINT
0x2c - LEDC_LSCH2_HPOINT.
sourcepub fn ch3_hpoint(&self) -> &CH_HPOINT
pub fn ch3_hpoint(&self) -> &CH_HPOINT
0x40 - LEDC_LSCH3_HPOINT.
sourcepub fn ch4_hpoint(&self) -> &CH_HPOINT
pub fn ch4_hpoint(&self) -> &CH_HPOINT
0x54 - LEDC_LSCH4_HPOINT.
sourcepub fn ch5_hpoint(&self) -> &CH_HPOINT
pub fn ch5_hpoint(&self) -> &CH_HPOINT
0x68 - LEDC_LSCH5_HPOINT.
sourcepub fn ch_duty_iter(&self) -> impl Iterator<Item = &CH_DUTY>
pub fn ch_duty_iter(&self) -> impl Iterator<Item = &CH_DUTY>
Iterator for array of: 0x08..0x20 - LEDC_LSCH%s_DUTY.
sourcepub fn ch_conf1_iter(&self) -> impl Iterator<Item = &CH_CONF1>
pub fn ch_conf1_iter(&self) -> impl Iterator<Item = &CH_CONF1>
Iterator for array of: 0x0c..0x24 - LEDC_LSCH%s_CONF1.
sourcepub fn ch_duty_r_iter(&self) -> impl Iterator<Item = &CH_DUTY_R>
pub fn ch_duty_r_iter(&self) -> impl Iterator<Item = &CH_DUTY_R>
Iterator for array of: 0x10..0x28 - LEDC_LSCH%s_DUTY_R.
sourcepub fn ch0_duty_r(&self) -> &CH_DUTY_R
pub fn ch0_duty_r(&self) -> &CH_DUTY_R
0x10 - LEDC_LSCH0_DUTY_R.
sourcepub fn ch1_duty_r(&self) -> &CH_DUTY_R
pub fn ch1_duty_r(&self) -> &CH_DUTY_R
0x24 - LEDC_LSCH1_DUTY_R.
sourcepub fn ch2_duty_r(&self) -> &CH_DUTY_R
pub fn ch2_duty_r(&self) -> &CH_DUTY_R
0x38 - LEDC_LSCH2_DUTY_R.
sourcepub fn ch3_duty_r(&self) -> &CH_DUTY_R
pub fn ch3_duty_r(&self) -> &CH_DUTY_R
0x4c - LEDC_LSCH3_DUTY_R.
sourcepub fn ch4_duty_r(&self) -> &CH_DUTY_R
pub fn ch4_duty_r(&self) -> &CH_DUTY_R
0x60 - LEDC_LSCH4_DUTY_R.
sourcepub fn ch5_duty_r(&self) -> &CH_DUTY_R
pub fn ch5_duty_r(&self) -> &CH_DUTY_R
0x74 - LEDC_LSCH5_DUTY_R.
sourcepub fn timer_conf(&self, n: usize) -> &TIMER_CONF
pub fn timer_conf(&self, n: usize) -> &TIMER_CONF
0xa0..0xb0 - LEDC_LSTIMER%s_CONF.
sourcepub fn timer_conf_iter(&self) -> impl Iterator<Item = &TIMER_CONF>
pub fn timer_conf_iter(&self) -> impl Iterator<Item = &TIMER_CONF>
Iterator for array of: 0xa0..0xb0 - LEDC_LSTIMER%s_CONF.
sourcepub fn timer0_conf(&self) -> &TIMER_CONF
pub fn timer0_conf(&self) -> &TIMER_CONF
0xa0 - LEDC_LSTIMER0_CONF.
sourcepub fn timer1_conf(&self) -> &TIMER_CONF
pub fn timer1_conf(&self) -> &TIMER_CONF
0xa8 - LEDC_LSTIMER1_CONF.
sourcepub fn timer2_conf(&self) -> &TIMER_CONF
pub fn timer2_conf(&self) -> &TIMER_CONF
0xb0 - LEDC_LSTIMER2_CONF.
sourcepub fn timer3_conf(&self) -> &TIMER_CONF
pub fn timer3_conf(&self) -> &TIMER_CONF
0xb8 - LEDC_LSTIMER3_CONF.
sourcepub fn timer_value(&self, n: usize) -> &TIMER_VALUE
pub fn timer_value(&self, n: usize) -> &TIMER_VALUE
0xa4..0xb4 - LEDC_LSTIMER%s_VALUE.
sourcepub fn timer_value_iter(&self) -> impl Iterator<Item = &TIMER_VALUE>
pub fn timer_value_iter(&self) -> impl Iterator<Item = &TIMER_VALUE>
Iterator for array of: 0xa4..0xb4 - LEDC_LSTIMER%s_VALUE.
sourcepub fn timer0_value(&self) -> &TIMER_VALUE
pub fn timer0_value(&self) -> &TIMER_VALUE
0xa4 - LEDC_LSTIMER0_VALUE.
sourcepub fn timer1_value(&self) -> &TIMER_VALUE
pub fn timer1_value(&self) -> &TIMER_VALUE
0xac - LEDC_LSTIMER1_VALUE.
sourcepub fn timer2_value(&self) -> &TIMER_VALUE
pub fn timer2_value(&self) -> &TIMER_VALUE
0xb4 - LEDC_LSTIMER2_VALUE.
sourcepub fn timer3_value(&self) -> &TIMER_VALUE
pub fn timer3_value(&self) -> &TIMER_VALUE
0xbc - LEDC_LSTIMER3_VALUE.