esp32c2/ledc/
ch.rs

1#[repr(C)]
2#[cfg_attr(feature = "impl-register-debug", derive(Debug))]
3#[doc = "Cluster CH%s, containing CH?_CONF0, CH?_HPOINT, CH?_DUTY, CH?_CONF1, CH?_DUTY_R"]
4pub struct CH {
5    conf0: CONF0,
6    hpoint: HPOINT,
7    duty: DUTY,
8    conf1: CONF1,
9    duty_r: DUTY_R,
10}
11impl CH {
12    #[doc = "0x00 - Configuration register 0 for channel 0"]
13    #[inline(always)]
14    pub const fn conf0(&self) -> &CONF0 {
15        &self.conf0
16    }
17    #[doc = "0x04 - High point register for channel 0"]
18    #[inline(always)]
19    pub const fn hpoint(&self) -> &HPOINT {
20        &self.hpoint
21    }
22    #[doc = "0x08 - Initial duty cycle for channel 0"]
23    #[inline(always)]
24    pub const fn duty(&self) -> &DUTY {
25        &self.duty
26    }
27    #[doc = "0x0c - Configuration register 1 for channel 0"]
28    #[inline(always)]
29    pub const fn conf1(&self) -> &CONF1 {
30        &self.conf1
31    }
32    #[doc = "0x10 - Current duty cycle for channel 0"]
33    #[inline(always)]
34    pub const fn duty_r(&self) -> &DUTY_R {
35        &self.duty_r
36    }
37}
38#[doc = "CONF0 (rw) register accessor: Configuration register 0 for channel 0\n\nYou can [`read`](crate::Reg::read) this register and get [`conf0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`conf0::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@conf0`] module"]
39pub type CONF0 = crate::Reg<conf0::CONF0_SPEC>;
40#[doc = "Configuration register 0 for channel 0"]
41pub mod conf0;
42#[doc = "HPOINT (rw) register accessor: High point register for channel 0\n\nYou can [`read`](crate::Reg::read) this register and get [`hpoint::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`hpoint::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@hpoint`] module"]
43pub type HPOINT = crate::Reg<hpoint::HPOINT_SPEC>;
44#[doc = "High point register for channel 0"]
45pub mod hpoint;
46#[doc = "DUTY (rw) register accessor: Initial duty cycle for channel 0\n\nYou can [`read`](crate::Reg::read) this register and get [`duty::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`duty::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@duty`] module"]
47pub type DUTY = crate::Reg<duty::DUTY_SPEC>;
48#[doc = "Initial duty cycle for channel 0"]
49pub mod duty;
50#[doc = "CONF1 (rw) register accessor: Configuration register 1 for channel 0\n\nYou can [`read`](crate::Reg::read) this register and get [`conf1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`conf1::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@conf1`] module"]
51pub type CONF1 = crate::Reg<conf1::CONF1_SPEC>;
52#[doc = "Configuration register 1 for channel 0"]
53pub mod conf1;
54#[doc = "DUTY_R (r) register accessor: Current duty cycle for channel 0\n\nYou can [`read`](crate::Reg::read) this register and get [`duty_r::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@duty_r`] module"]
55pub type DUTY_R = crate::Reg<duty_r::DUTY_R_SPEC>;
56#[doc = "Current duty cycle for channel 0"]
57pub mod duty_r;