e310x/
pwm0.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    cfg: Cfg,
5    _reserved1: [u8; 0x04],
6    count: Count,
7    _reserved2: [u8; 0x04],
8    pwms: Pwms,
9    _reserved3: [u8; 0x0c],
10    cmp0: Cmp0,
11    cmp1: Cmp1,
12    cmp2: Cmp2,
13    cmp3: Cmp3,
14}
15impl RegisterBlock {
16    #[doc = "0x00 - PWM Configuration Register"]
17    #[inline(always)]
18    pub const fn cfg(&self) -> &Cfg {
19        &self.cfg
20    }
21    #[doc = "0x08 - Counter Register"]
22    #[inline(always)]
23    pub const fn count(&self) -> &Count {
24        &self.count
25    }
26    #[doc = "0x10 - Scaled Halfword Counter Register"]
27    #[inline(always)]
28    pub const fn pwms(&self) -> &Pwms {
29        &self.pwms
30    }
31    #[doc = "0x20 - Compare Register"]
32    #[inline(always)]
33    pub const fn cmp0(&self) -> &Cmp0 {
34        &self.cmp0
35    }
36    #[doc = "0x24 - Compare Register"]
37    #[inline(always)]
38    pub const fn cmp1(&self) -> &Cmp1 {
39        &self.cmp1
40    }
41    #[doc = "0x28 - Compare Register"]
42    #[inline(always)]
43    pub const fn cmp2(&self) -> &Cmp2 {
44        &self.cmp2
45    }
46    #[doc = "0x2c - Compare Register"]
47    #[inline(always)]
48    pub const fn cmp3(&self) -> &Cmp3 {
49        &self.cmp3
50    }
51}
52#[doc = "cfg (rw) register accessor: PWM Configuration Register\n\nYou can [`read`](crate::Reg::read) this register and get [`cfg::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cfg::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@cfg`]
53module"]
54#[doc(alias = "cfg")]
55pub type Cfg = crate::Reg<cfg::CfgSpec>;
56#[doc = "PWM Configuration Register"]
57pub mod cfg;
58#[doc = "count (rw) register accessor: Counter Register\n\nYou can [`read`](crate::Reg::read) this register and get [`count::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`count::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@count`]
59module"]
60#[doc(alias = "count")]
61pub type Count = crate::Reg<count::CountSpec>;
62#[doc = "Counter Register"]
63pub mod count;
64#[doc = "pwms (rw) register accessor: Scaled Halfword Counter Register\n\nYou can [`read`](crate::Reg::read) this register and get [`pwms::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pwms::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@pwms`]
65module"]
66#[doc(alias = "pwms")]
67pub type Pwms = crate::Reg<pwms::PwmsSpec>;
68#[doc = "Scaled Halfword Counter Register"]
69pub mod pwms;
70#[doc = "cmp0 (rw) register accessor: Compare Register\n\nYou can [`read`](crate::Reg::read) this register and get [`cmp0::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmp0::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@cmp0`]
71module"]
72#[doc(alias = "cmp0")]
73pub type Cmp0 = crate::Reg<cmp0::Cmp0Spec>;
74#[doc = "Compare Register"]
75pub mod cmp0;
76#[doc = "cmp1 (rw) register accessor: Compare Register\n\nYou can [`read`](crate::Reg::read) this register and get [`cmp1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmp1::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@cmp1`]
77module"]
78#[doc(alias = "cmp1")]
79pub type Cmp1 = crate::Reg<cmp1::Cmp1Spec>;
80#[doc = "Compare Register"]
81pub mod cmp1;
82#[doc = "cmp2 (rw) register accessor: Compare Register\n\nYou can [`read`](crate::Reg::read) this register and get [`cmp2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmp2::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@cmp2`]
83module"]
84#[doc(alias = "cmp2")]
85pub type Cmp2 = crate::Reg<cmp2::Cmp2Spec>;
86#[doc = "Compare Register"]
87pub mod cmp2;
88#[doc = "cmp3 (rw) register accessor: Compare Register\n\nYou can [`read`](crate::Reg::read) this register and get [`cmp3::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cmp3::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@cmp3`]
89module"]
90#[doc(alias = "cmp3")]
91pub type Cmp3 = crate::Reg<cmp3::Cmp3Spec>;
92#[doc = "Compare Register"]
93pub mod cmp3;