nrf51_pac/
timer0.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    #[doc = "0x00 - Start Timer."]
5    pub tasks_start: TASKS_START,
6    #[doc = "0x04 - Stop Timer."]
7    pub tasks_stop: TASKS_STOP,
8    #[doc = "0x08 - Increment Timer (In counter mode)."]
9    pub tasks_count: TASKS_COUNT,
10    #[doc = "0x0c - Clear timer."]
11    pub tasks_clear: TASKS_CLEAR,
12    #[doc = "0x10 - Shutdown timer."]
13    pub tasks_shutdown: TASKS_SHUTDOWN,
14    _reserved5: [u8; 0x2c],
15    #[doc = "0x40..0x50 - Capture Timer value to CC\\[n\\]
16registers."]
17    pub tasks_capture: [TASKS_CAPTURE; 4],
18    _reserved6: [u8; 0xf0],
19    #[doc = "0x140..0x150 - Compare event on CC\\[n\\]
20match."]
21    pub events_compare: [EVENTS_COMPARE; 4],
22    _reserved7: [u8; 0xb0],
23    #[doc = "0x200 - Shortcuts for Timer."]
24    pub shorts: SHORTS,
25    _reserved8: [u8; 0x0100],
26    #[doc = "0x304 - Interrupt enable set register."]
27    pub intenset: INTENSET,
28    #[doc = "0x308 - Interrupt enable clear register."]
29    pub intenclr: INTENCLR,
30    _reserved10: [u8; 0x01f8],
31    #[doc = "0x504 - Timer Mode selection."]
32    pub mode: MODE,
33    #[doc = "0x508 - Sets timer behaviour."]
34    pub bitmode: BITMODE,
35    _reserved12: [u8; 0x04],
36    #[doc = "0x510 - 4-bit prescaler to source clock frequency (max value 9). Source clock frequency is divided by 2^SCALE."]
37    pub prescaler: PRESCALER,
38    _reserved13: [u8; 0x2c],
39    #[doc = "0x540..0x550 - Capture/compare registers."]
40    pub cc: [CC; 4],
41    _reserved14: [u8; 0x0aac],
42    #[doc = "0xffc - Peripheral power control."]
43    pub power: POWER,
44}
45#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
46pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
47#[doc = "Start Timer."]
48pub mod tasks_start;
49#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
50pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
51#[doc = "Stop Timer."]
52pub mod tasks_stop;
53#[doc = "TASKS_COUNT (w) register accessor: an alias for `Reg<TASKS_COUNT_SPEC>`"]
54pub type TASKS_COUNT = crate::Reg<tasks_count::TASKS_COUNT_SPEC>;
55#[doc = "Increment Timer (In counter mode)."]
56pub mod tasks_count;
57#[doc = "TASKS_CLEAR (w) register accessor: an alias for `Reg<TASKS_CLEAR_SPEC>`"]
58pub type TASKS_CLEAR = crate::Reg<tasks_clear::TASKS_CLEAR_SPEC>;
59#[doc = "Clear timer."]
60pub mod tasks_clear;
61#[doc = "TASKS_SHUTDOWN (w) register accessor: an alias for `Reg<TASKS_SHUTDOWN_SPEC>`"]
62pub type TASKS_SHUTDOWN = crate::Reg<tasks_shutdown::TASKS_SHUTDOWN_SPEC>;
63#[doc = "Shutdown timer."]
64pub mod tasks_shutdown;
65#[doc = "TASKS_CAPTURE (w) register accessor: an alias for `Reg<TASKS_CAPTURE_SPEC>`"]
66pub type TASKS_CAPTURE = crate::Reg<tasks_capture::TASKS_CAPTURE_SPEC>;
67#[doc = "Capture Timer value to CC\\[n\\]
68registers."]
69pub mod tasks_capture;
70#[doc = "EVENTS_COMPARE (rw) register accessor: an alias for `Reg<EVENTS_COMPARE_SPEC>`"]
71pub type EVENTS_COMPARE = crate::Reg<events_compare::EVENTS_COMPARE_SPEC>;
72#[doc = "Compare event on CC\\[n\\]
73match."]
74pub mod events_compare;
75#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
76pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
77#[doc = "Shortcuts for Timer."]
78pub mod shorts;
79#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
80pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
81#[doc = "Interrupt enable set register."]
82pub mod intenset;
83#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
84pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
85#[doc = "Interrupt enable clear register."]
86pub mod intenclr;
87#[doc = "MODE (rw) register accessor: an alias for `Reg<MODE_SPEC>`"]
88pub type MODE = crate::Reg<mode::MODE_SPEC>;
89#[doc = "Timer Mode selection."]
90pub mod mode;
91#[doc = "BITMODE (rw) register accessor: an alias for `Reg<BITMODE_SPEC>`"]
92pub type BITMODE = crate::Reg<bitmode::BITMODE_SPEC>;
93#[doc = "Sets timer behaviour."]
94pub mod bitmode;
95#[doc = "PRESCALER (rw) register accessor: an alias for `Reg<PRESCALER_SPEC>`"]
96pub type PRESCALER = crate::Reg<prescaler::PRESCALER_SPEC>;
97#[doc = "4-bit prescaler to source clock frequency (max value 9). Source clock frequency is divided by 2^SCALE."]
98pub mod prescaler;
99#[doc = "CC (rw) register accessor: an alias for `Reg<CC_SPEC>`"]
100pub type CC = crate::Reg<cc::CC_SPEC>;
101#[doc = "Capture/compare registers."]
102pub mod cc;
103#[doc = "POWER (rw) register accessor: an alias for `Reg<POWER_SPEC>`"]
104pub type POWER = crate::Reg<power::POWER_SPEC>;
105#[doc = "Peripheral power control."]
106pub mod power;