stm32l476/
tim6.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    cr1: Cr1,
5    cr2: Cr2,
6    _reserved2: [u8; 0x04],
7    dier: Dier,
8    sr: Sr,
9    egr: Egr,
10    _reserved5: [u8; 0x0c],
11    cnt: Cnt,
12    psc: Psc,
13    arr: Arr,
14}
15impl RegisterBlock {
16    #[doc = "0x00 - control register 1"]
17    #[inline(always)]
18    pub const fn cr1(&self) -> &Cr1 {
19        &self.cr1
20    }
21    #[doc = "0x04 - control register 2"]
22    #[inline(always)]
23    pub const fn cr2(&self) -> &Cr2 {
24        &self.cr2
25    }
26    #[doc = "0x0c - DMA/Interrupt enable register"]
27    #[inline(always)]
28    pub const fn dier(&self) -> &Dier {
29        &self.dier
30    }
31    #[doc = "0x10 - status register"]
32    #[inline(always)]
33    pub const fn sr(&self) -> &Sr {
34        &self.sr
35    }
36    #[doc = "0x14 - event generation register"]
37    #[inline(always)]
38    pub const fn egr(&self) -> &Egr {
39        &self.egr
40    }
41    #[doc = "0x24 - counter"]
42    #[inline(always)]
43    pub const fn cnt(&self) -> &Cnt {
44        &self.cnt
45    }
46    #[doc = "0x28 - prescaler"]
47    #[inline(always)]
48    pub const fn psc(&self) -> &Psc {
49        &self.psc
50    }
51    #[doc = "0x2c - auto-reload register"]
52    #[inline(always)]
53    pub const fn arr(&self) -> &Arr {
54        &self.arr
55    }
56}
57#[doc = "CR1 (rw) register accessor: control register 1\n\nYou can [`read`](crate::Reg::read) this register and get [`cr1::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr1::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@cr1`] module"]
58#[doc(alias = "CR1")]
59pub type Cr1 = crate::Reg<cr1::Cr1Spec>;
60#[doc = "control register 1"]
61pub mod cr1;
62#[doc = "CR2 (rw) register accessor: control register 2\n\nYou can [`read`](crate::Reg::read) this register and get [`cr2::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr2::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@cr2`] module"]
63#[doc(alias = "CR2")]
64pub type Cr2 = crate::Reg<cr2::Cr2Spec>;
65#[doc = "control register 2"]
66pub mod cr2;
67#[doc = "DIER (rw) register accessor: DMA/Interrupt enable register\n\nYou can [`read`](crate::Reg::read) this register and get [`dier::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dier::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@dier`] module"]
68#[doc(alias = "DIER")]
69pub type Dier = crate::Reg<dier::DierSpec>;
70#[doc = "DMA/Interrupt enable register"]
71pub mod dier;
72#[doc = "SR (rw) register accessor: status register\n\nYou can [`read`](crate::Reg::read) this register and get [`sr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`sr::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@sr`] module"]
73#[doc(alias = "SR")]
74pub type Sr = crate::Reg<sr::SrSpec>;
75#[doc = "status register"]
76pub mod sr;
77#[doc = "EGR (w) register accessor: event generation register\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`egr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@egr`] module"]
78#[doc(alias = "EGR")]
79pub type Egr = crate::Reg<egr::EgrSpec>;
80#[doc = "event generation register"]
81pub mod egr;
82#[doc = "CNT (rw) register accessor: counter\n\nYou can [`read`](crate::Reg::read) this register and get [`cnt::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cnt::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@cnt`] module"]
83#[doc(alias = "CNT")]
84pub type Cnt = crate::Reg<cnt::CntSpec>;
85#[doc = "counter"]
86pub mod cnt;
87#[doc = "PSC (rw) register accessor: prescaler\n\nYou can [`read`](crate::Reg::read) this register and get [`psc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`psc::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@psc`] module"]
88#[doc(alias = "PSC")]
89pub type Psc = crate::Reg<psc::PscSpec>;
90#[doc = "prescaler"]
91pub mod psc;
92#[doc = "ARR (rw) register accessor: auto-reload register\n\nYou can [`read`](crate::Reg::read) this register and get [`arr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`arr::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@arr`] module"]
93#[doc(alias = "ARR")]
94pub type Arr = crate::Reg<arr::ArrSpec>;
95#[doc = "auto-reload register"]
96pub mod arr;