gd32e5/gd32e508/
timer5.rs1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4 ctl0: Ctl0,
5 ctl1: Ctl1,
6 _reserved2: [u8; 0x04],
7 dmainten: Dmainten,
8 intf: Intf,
9 swevg: Swevg,
10 _reserved5: [u8; 0x0c],
11 cnt: Cnt,
12 psc: Psc,
13 car: Car,
14}
15impl RegisterBlock {
16 #[doc = "0x00 - control register 0"]
17 #[inline(always)]
18 pub const fn ctl0(&self) -> &Ctl0 {
19 &self.ctl0
20 }
21 #[doc = "0x04 - control register 1"]
22 #[inline(always)]
23 pub const fn ctl1(&self) -> &Ctl1 {
24 &self.ctl1
25 }
26 #[doc = "0x0c - DMA/Interrupt enable register"]
27 #[inline(always)]
28 pub const fn dmainten(&self) -> &Dmainten {
29 &self.dmainten
30 }
31 #[doc = "0x10 - Interrupt flag register"]
32 #[inline(always)]
33 pub const fn intf(&self) -> &Intf {
34 &self.intf
35 }
36 #[doc = "0x14 - event generation register"]
37 #[inline(always)]
38 pub const fn swevg(&self) -> &Swevg {
39 &self.swevg
40 }
41 #[doc = "0x24 - Counter register"]
42 #[inline(always)]
43 pub const fn cnt(&self) -> &Cnt {
44 &self.cnt
45 }
46 #[doc = "0x28 - Prescaler register"]
47 #[inline(always)]
48 pub const fn psc(&self) -> &Psc {
49 &self.psc
50 }
51 #[doc = "0x2c - Counter auto reload register"]
52 #[inline(always)]
53 pub const fn car(&self) -> &Car {
54 &self.car
55 }
56}
57#[doc = "CTL0 (rw) register accessor: control register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctl0::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ctl0::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctl0`]
58module"]
59#[doc(alias = "CTL0")]
60pub type Ctl0 = crate::Reg<ctl0::Ctl0Spec>;
61#[doc = "control register 0"]
62pub mod ctl0;
63#[doc = "CTL1 (rw) register accessor: control register 1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ctl1::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ctl1::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctl1`]
64module"]
65#[doc(alias = "CTL1")]
66pub type Ctl1 = crate::Reg<ctl1::Ctl1Spec>;
67#[doc = "control register 1"]
68pub mod ctl1;
69#[doc = "DMAINTEN (rw) register accessor: DMA/Interrupt enable register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dmainten::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`dmainten::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@dmainten`]
70module"]
71#[doc(alias = "DMAINTEN")]
72pub type Dmainten = crate::Reg<dmainten::DmaintenSpec>;
73#[doc = "DMA/Interrupt enable register"]
74pub mod dmainten;
75#[doc = "INTF (rw) register accessor: Interrupt flag register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`intf::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`intf::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intf`]
76module"]
77#[doc(alias = "INTF")]
78pub type Intf = crate::Reg<intf::IntfSpec>;
79#[doc = "Interrupt flag register"]
80pub mod intf;
81#[doc = "SWEVG (w) register accessor: event generation register\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`swevg::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@swevg`]
82module"]
83#[doc(alias = "SWEVG")]
84pub type Swevg = crate::Reg<swevg::SwevgSpec>;
85#[doc = "event generation register"]
86pub mod swevg;
87#[doc = "CNT (rw) register accessor: Counter register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cnt::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cnt::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@cnt`]
88module"]
89#[doc(alias = "CNT")]
90pub type Cnt = crate::Reg<cnt::CntSpec>;
91#[doc = "Counter register"]
92pub mod cnt;
93#[doc = "PSC (rw) register accessor: Prescaler register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`psc::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`psc::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@psc`]
94module"]
95#[doc(alias = "PSC")]
96pub type Psc = crate::Reg<psc::PscSpec>;
97#[doc = "Prescaler register"]
98pub mod psc;
99#[doc = "CAR (rw) register accessor: Counter auto reload register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`car::R`]. You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`car::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@car`]
100module"]
101#[doc(alias = "CAR")]
102pub type Car = crate::Reg<car::CarSpec>;
103#[doc = "Counter auto reload register"]
104pub mod car;