Skip to main content

mik32_pac/
scr1_timer.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    timer_ctrl: TimerCtrl,
5    timer_div: TimerDiv,
6    mtime: Mtime,
7    mtimeh: Mtimeh,
8    mtimecmp: Mtimecmp,
9    mtimecmph: Mtimecmph,
10}
11impl RegisterBlock {
12    #[doc = "0x00 - Регистр конфигурации"]
13    #[inline(always)]
14    pub const fn timer_ctrl(&self) -> &TimerCtrl {
15        &self.timer_ctrl
16    }
17    #[doc = "0x04 - Делитель частоты. Счет идет каждые DIV+1 такта частоты"]
18    #[inline(always)]
19    pub const fn timer_div(&self) -> &TimerDiv {
20        &self.timer_div
21    }
22    #[doc = "0x08 - Счетчик таймера, младшее слово"]
23    #[inline(always)]
24    pub const fn mtime(&self) -> &Mtime {
25        &self.mtime
26    }
27    #[doc = "0x0c - Счетчик таймера, старшее слово"]
28    #[inline(always)]
29    pub const fn mtimeh(&self) -> &Mtimeh {
30        &self.mtimeh
31    }
32    #[doc = "0x10 - Регистр сравнения, младшее слово"]
33    #[inline(always)]
34    pub const fn mtimecmp(&self) -> &Mtimecmp {
35        &self.mtimecmp
36    }
37    #[doc = "0x14 - Регистр сравнения, старшее слово"]
38    #[inline(always)]
39    pub const fn mtimecmph(&self) -> &Mtimecmph {
40        &self.mtimecmph
41    }
42}
43#[doc = "TIMER_CTRL (rw) register accessor: Регистр конфигурации\n\nYou can [`read`](crate::Reg::read) this register and get [`timer_ctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`timer_ctrl::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@timer_ctrl`] module"]
44#[doc(alias = "TIMER_CTRL")]
45pub type TimerCtrl = crate::Reg<timer_ctrl::TimerCtrlSpec>;
46#[doc = "Регистр конфигурации"]
47pub mod timer_ctrl;
48#[doc = "TIMER_DIV (rw) register accessor: Делитель частоты. Счет идет каждые DIV+1 такта частоты\n\nYou can [`read`](crate::Reg::read) this register and get [`timer_div::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`timer_div::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@timer_div`] module"]
49#[doc(alias = "TIMER_DIV")]
50pub type TimerDiv = crate::Reg<timer_div::TimerDivSpec>;
51#[doc = "Делитель частоты. Счет идет каждые DIV+1 такта частоты"]
52pub mod timer_div;
53#[doc = "MTIME (rw) register accessor: Счетчик таймера, младшее слово\n\nYou can [`read`](crate::Reg::read) this register and get [`mtime::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mtime::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@mtime`] module"]
54#[doc(alias = "MTIME")]
55pub type Mtime = crate::Reg<mtime::MtimeSpec>;
56#[doc = "Счетчик таймера, младшее слово"]
57pub mod mtime;
58#[doc = "MTIMEH (rw) register accessor: Счетчик таймера, старшее слово\n\nYou can [`read`](crate::Reg::read) this register and get [`mtimeh::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mtimeh::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@mtimeh`] module"]
59#[doc(alias = "MTIMEH")]
60pub type Mtimeh = crate::Reg<mtimeh::MtimehSpec>;
61#[doc = "Счетчик таймера, старшее слово"]
62pub mod mtimeh;
63#[doc = "MTIMECMP (rw) register accessor: Регистр сравнения, младшее слово\n\nYou can [`read`](crate::Reg::read) this register and get [`mtimecmp::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mtimecmp::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@mtimecmp`] module"]
64#[doc(alias = "MTIMECMP")]
65pub type Mtimecmp = crate::Reg<mtimecmp::MtimecmpSpec>;
66#[doc = "Регистр сравнения, младшее слово"]
67pub mod mtimecmp;
68#[doc = "MTIMECMPH (rw) register accessor: Регистр сравнения, старшее слово\n\nYou can [`read`](crate::Reg::read) this register and get [`mtimecmph::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`mtimecmph::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@mtimecmph`] module"]
69#[doc(alias = "MTIMECMPH")]
70pub type Mtimecmph = crate::Reg<mtimecmph::MtimecmphSpec>;
71#[doc = "Регистр сравнения, старшее слово"]
72pub mod mtimecmph;