1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4 value: Value,
5 top: Top,
6 prescale: Prescale,
7 control: Control,
8 enable: Enable,
9 int_mask: IntMask,
10 int_clear: IntClear,
11 int_flag: IntFlag,
12 _reserved8: [u8; 0x60],
13 ch1_cntr: Ch1Cntr,
14 ch1_ocr: Ch1Ocr,
15 ch1_icr: Ch1Icr,
16 _reserved11: [u8; 0x04],
17 _reserved_11_ch2_cntr: [u8; 0x04],
18 ch2_ocr: Ch2Ocr,
19 ch2_icr: Ch2Icr,
20 _reserved14: [u8; 0x08],
21 ch3_ocr: Ch3Ocr,
22 ch3_icr: Ch3Icr,
23 _reserved16: [u8; 0x04],
24 ch4_cntr: Ch4Cntr,
25 ch4_ocr: Ch4Ocr,
26 ch4_icr: Ch4Icr,
27}
28impl RegisterBlock {
29 #[doc = "0x00 - "]
30 #[inline(always)]
31 pub const fn value(&self) -> &Value {
32 &self.value
33 }
34 #[doc = "0x04 - максимальное значение счетной последовательности"]
35 #[inline(always)]
36 pub const fn top(&self) -> &Top {
37 &self.top
38 }
39 #[doc = "0x08 - значение делителя"]
40 #[inline(always)]
41 pub const fn prescale(&self) -> &Prescale {
42 &self.prescale
43 }
44 #[doc = "0x0c - Конфигурационный регистр основного таймера"]
45 #[inline(always)]
46 pub const fn control(&self) -> &Control {
47 &self.control
48 }
49 #[doc = "0x10 - Регистр включения таймера"]
50 #[inline(always)]
51 pub const fn enable(&self) -> &Enable {
52 &self.enable
53 }
54 #[doc = "0x14 - Регистр маски прерываний"]
55 #[inline(always)]
56 pub const fn int_mask(&self) -> &IntMask {
57 &self.int_mask
58 }
59 #[doc = "0x18 - Регистр сброса флагов прерываний"]
60 #[inline(always)]
61 pub const fn int_clear(&self) -> &IntClear {
62 &self.int_clear
63 }
64 #[doc = "0x1c - Регистр флагов прерываний"]
65 #[inline(always)]
66 pub const fn int_flag(&self) -> &IntFlag {
67 &self.int_flag
68 }
69 #[doc = "0x80 - Конфигурационный регистр 1 канала"]
70 #[inline(always)]
71 pub const fn ch1_cntr(&self) -> &Ch1Cntr {
72 &self.ch1_cntr
73 }
74 #[doc = "0x84 - Значение сравнения 1 канала"]
75 #[inline(always)]
76 pub const fn ch1_ocr(&self) -> &Ch1Ocr {
77 &self.ch1_ocr
78 }
79 #[doc = "0x88 - Значение захвата 1 канала"]
80 #[inline(always)]
81 pub const fn ch1_icr(&self) -> &Ch1Icr {
82 &self.ch1_icr
83 }
84 #[doc = "0x90 - Конфигурационный регистр 3 канала"]
85 #[inline(always)]
86 pub const fn ch3_cntr(&self) -> &Ch3Cntr {
87 unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(144).cast() }
88 }
89 #[doc = "0x90 - Конфигурационный регистр 2 канала"]
90 #[inline(always)]
91 pub const fn ch2_cntr(&self) -> &Ch2Cntr {
92 unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(144).cast() }
93 }
94 #[doc = "0x94 - Значение сравнения 2 канала"]
95 #[inline(always)]
96 pub const fn ch2_ocr(&self) -> &Ch2Ocr {
97 &self.ch2_ocr
98 }
99 #[doc = "0x98 - Значение захвата 2 канала"]
100 #[inline(always)]
101 pub const fn ch2_icr(&self) -> &Ch2Icr {
102 &self.ch2_icr
103 }
104 #[doc = "0xa4 - Значение сравнения 3 канала"]
105 #[inline(always)]
106 pub const fn ch3_ocr(&self) -> &Ch3Ocr {
107 &self.ch3_ocr
108 }
109 #[doc = "0xa8 - Значение захвата 3 канала"]
110 #[inline(always)]
111 pub const fn ch3_icr(&self) -> &Ch3Icr {
112 &self.ch3_icr
113 }
114 #[doc = "0xb0 - Конфигурационный регистр 4 канала"]
115 #[inline(always)]
116 pub const fn ch4_cntr(&self) -> &Ch4Cntr {
117 &self.ch4_cntr
118 }
119 #[doc = "0xb4 - Значение сравнения 4 канала"]
120 #[inline(always)]
121 pub const fn ch4_ocr(&self) -> &Ch4Ocr {
122 &self.ch4_ocr
123 }
124 #[doc = "0xb8 - Значение захвата 4 канала"]
125 #[inline(always)]
126 pub const fn ch4_icr(&self) -> &Ch4Icr {
127 &self.ch4_icr
128 }
129}
130#[doc = "VALUE (rw) register accessor: \n\nYou can [`read`](crate::Reg::read) this register and get [`value::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`value::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@value`]
131module"]
132#[doc(alias = "VALUE")]
133pub type Value = crate::Reg<value::ValueSpec>;
134#[doc = ""]
135pub mod value;
136#[doc = "TOP (rw) register accessor: максимальное значение счетной последовательности\n\nYou can [`read`](crate::Reg::read) this register and get [`top::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`top::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@top`]
137module"]
138#[doc(alias = "TOP")]
139pub type Top = crate::Reg<top::TopSpec>;
140#[doc = "максимальное значение счетной последовательности"]
141pub mod top;
142#[doc = "PRESCALE (rw) register accessor: значение делителя\n\nYou can [`read`](crate::Reg::read) this register and get [`prescale::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prescale::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@prescale`]
143module"]
144#[doc(alias = "PRESCALE")]
145pub type Prescale = crate::Reg<prescale::PrescaleSpec>;
146#[doc = "значение делителя"]
147pub mod prescale;
148#[doc = "CONTROL (rw) register accessor: Конфигурационный регистр основного таймера\n\nYou can [`read`](crate::Reg::read) this register and get [`control::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`control::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@control`]
149module"]
150#[doc(alias = "CONTROL")]
151pub type Control = crate::Reg<control::ControlSpec>;
152#[doc = "Конфигурационный регистр основного таймера"]
153pub mod control;
154#[doc = "ENABLE (rw) register accessor: Регистр включения таймера\n\nYou can [`read`](crate::Reg::read) this register and get [`enable::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`enable::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@enable`]
155module"]
156#[doc(alias = "ENABLE")]
157pub type Enable = crate::Reg<enable::EnableSpec>;
158#[doc = "Регистр включения таймера"]
159pub mod enable;
160#[doc = "INT_MASK (rw) register accessor: Регистр маски прерываний\n\nYou can [`read`](crate::Reg::read) this register and get [`int_mask::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_mask::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@int_mask`]
161module"]
162#[doc(alias = "INT_MASK")]
163pub type IntMask = crate::Reg<int_mask::IntMaskSpec>;
164#[doc = "Регистр маски прерываний"]
165pub mod int_mask;
166#[doc = "INT_CLEAR (rw) register accessor: Регистр сброса флагов прерываний\n\nYou can [`read`](crate::Reg::read) this register and get [`int_clear::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_clear::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@int_clear`]
167module"]
168#[doc(alias = "INT_CLEAR")]
169pub type IntClear = crate::Reg<int_clear::IntClearSpec>;
170#[doc = "Регистр сброса флагов прерываний"]
171pub mod int_clear;
172#[doc = "INT_FLAG (rw) register accessor: Регистр флагов прерываний\n\nYou can [`read`](crate::Reg::read) this register and get [`int_flag::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`int_flag::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@int_flag`]
173module"]
174#[doc(alias = "INT_FLAG")]
175pub type IntFlag = crate::Reg<int_flag::IntFlagSpec>;
176#[doc = "Регистр флагов прерываний"]
177pub mod int_flag;
178#[doc = "CH1_CNTR (rw) register accessor: Конфигурационный регистр 1 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch1_cntr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch1_cntr::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@ch1_cntr`]
179module"]
180#[doc(alias = "CH1_CNTR")]
181pub type Ch1Cntr = crate::Reg<ch1_cntr::Ch1CntrSpec>;
182#[doc = "Конфигурационный регистр 1 канала"]
183pub mod ch1_cntr;
184#[doc = "CH1_OCR (rw) register accessor: Значение сравнения 1 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch1_ocr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch1_ocr::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@ch1_ocr`]
185module"]
186#[doc(alias = "CH1_OCR")]
187pub type Ch1Ocr = crate::Reg<ch1_ocr::Ch1OcrSpec>;
188#[doc = "Значение сравнения 1 канала"]
189pub mod ch1_ocr;
190#[doc = "CH1_ICR (rw) register accessor: Значение захвата 1 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch1_icr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch1_icr::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@ch1_icr`]
191module"]
192#[doc(alias = "CH1_ICR")]
193pub type Ch1Icr = crate::Reg<ch1_icr::Ch1IcrSpec>;
194#[doc = "Значение захвата 1 канала"]
195pub mod ch1_icr;
196#[doc = "CH2_CNTR (rw) register accessor: Конфигурационный регистр 2 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch2_cntr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch2_cntr::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@ch2_cntr`]
197module"]
198#[doc(alias = "CH2_CNTR")]
199pub type Ch2Cntr = crate::Reg<ch2_cntr::Ch2CntrSpec>;
200#[doc = "Конфигурационный регистр 2 канала"]
201pub mod ch2_cntr;
202#[doc = "CH2_OCR (rw) register accessor: Значение сравнения 2 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch2_ocr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch2_ocr::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@ch2_ocr`]
203module"]
204#[doc(alias = "CH2_OCR")]
205pub type Ch2Ocr = crate::Reg<ch2_ocr::Ch2OcrSpec>;
206#[doc = "Значение сравнения 2 канала"]
207pub mod ch2_ocr;
208#[doc = "CH2_ICR (rw) register accessor: Значение захвата 2 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch2_icr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch2_icr::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@ch2_icr`]
209module"]
210#[doc(alias = "CH2_ICR")]
211pub type Ch2Icr = crate::Reg<ch2_icr::Ch2IcrSpec>;
212#[doc = "Значение захвата 2 канала"]
213pub mod ch2_icr;
214#[doc = "CH3_CNTR (rw) register accessor: Конфигурационный регистр 3 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch3_cntr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch3_cntr::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@ch3_cntr`]
215module"]
216#[doc(alias = "CH3_CNTR")]
217pub type Ch3Cntr = crate::Reg<ch3_cntr::Ch3CntrSpec>;
218#[doc = "Конфигурационный регистр 3 канала"]
219pub mod ch3_cntr;
220#[doc = "CH3_OCR (rw) register accessor: Значение сравнения 3 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch3_ocr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch3_ocr::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@ch3_ocr`]
221module"]
222#[doc(alias = "CH3_OCR")]
223pub type Ch3Ocr = crate::Reg<ch3_ocr::Ch3OcrSpec>;
224#[doc = "Значение сравнения 3 канала"]
225pub mod ch3_ocr;
226#[doc = "CH3_ICR (rw) register accessor: Значение захвата 3 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch3_icr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch3_icr::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@ch3_icr`]
227module"]
228#[doc(alias = "CH3_ICR")]
229pub type Ch3Icr = crate::Reg<ch3_icr::Ch3IcrSpec>;
230#[doc = "Значение захвата 3 канала"]
231pub mod ch3_icr;
232#[doc = "CH4_CNTR (rw) register accessor: Конфигурационный регистр 4 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch4_cntr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch4_cntr::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@ch4_cntr`]
233module"]
234#[doc(alias = "CH4_CNTR")]
235pub type Ch4Cntr = crate::Reg<ch4_cntr::Ch4CntrSpec>;
236#[doc = "Конфигурационный регистр 4 канала"]
237pub mod ch4_cntr;
238#[doc = "CH4_OCR (rw) register accessor: Значение сравнения 4 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch4_ocr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch4_ocr::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@ch4_ocr`]
239module"]
240#[doc(alias = "CH4_OCR")]
241pub type Ch4Ocr = crate::Reg<ch4_ocr::Ch4OcrSpec>;
242#[doc = "Значение сравнения 4 канала"]
243pub mod ch4_ocr;
244#[doc = "CH4_ICR (rw) register accessor: Значение захвата 4 канала\n\nYou can [`read`](crate::Reg::read) this register and get [`ch4_icr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ch4_icr::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@ch4_icr`]
245module"]
246#[doc(alias = "CH4_ICR")]
247pub type Ch4Icr = crate::Reg<ch4_icr::Ch4IcrSpec>;
248#[doc = "Значение захвата 4 канала"]
249pub mod ch4_icr;