nrf51_pac/
lpcomp.rs

1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4    #[doc = "0x00 - Start the comparator."]
5    pub tasks_start: TASKS_START,
6    #[doc = "0x04 - Stop the comparator."]
7    pub tasks_stop: TASKS_STOP,
8    #[doc = "0x08 - Sample comparator value."]
9    pub tasks_sample: TASKS_SAMPLE,
10    _reserved3: [u8; 0xf4],
11    #[doc = "0x100 - LPCOMP is ready and output is valid."]
12    pub events_ready: EVENTS_READY,
13    #[doc = "0x104 - Input voltage crossed the threshold going down."]
14    pub events_down: EVENTS_DOWN,
15    #[doc = "0x108 - Input voltage crossed the threshold going up."]
16    pub events_up: EVENTS_UP,
17    #[doc = "0x10c - Input voltage crossed the threshold in any direction."]
18    pub events_cross: EVENTS_CROSS,
19    _reserved7: [u8; 0xf0],
20    #[doc = "0x200 - Shortcuts for the LPCOMP."]
21    pub shorts: SHORTS,
22    _reserved8: [u8; 0x0100],
23    #[doc = "0x304 - Interrupt enable set register."]
24    pub intenset: INTENSET,
25    #[doc = "0x308 - Interrupt enable clear register."]
26    pub intenclr: INTENCLR,
27    _reserved10: [u8; 0xf4],
28    #[doc = "0x400 - Result of last compare."]
29    pub result: RESULT,
30    _reserved11: [u8; 0xfc],
31    #[doc = "0x500 - Enable the LPCOMP."]
32    pub enable: ENABLE,
33    #[doc = "0x504 - Input pin select."]
34    pub psel: PSEL,
35    #[doc = "0x508 - Reference select."]
36    pub refsel: REFSEL,
37    #[doc = "0x50c - External reference select."]
38    pub extrefsel: EXTREFSEL,
39    _reserved15: [u8; 0x10],
40    #[doc = "0x520 - Analog detect configuration."]
41    pub anadetect: ANADETECT,
42    _reserved16: [u8; 0x0ad8],
43    #[doc = "0xffc - Peripheral power control."]
44    pub power: POWER,
45}
46#[doc = "TASKS_START (w) register accessor: an alias for `Reg<TASKS_START_SPEC>`"]
47pub type TASKS_START = crate::Reg<tasks_start::TASKS_START_SPEC>;
48#[doc = "Start the comparator."]
49pub mod tasks_start;
50#[doc = "TASKS_STOP (w) register accessor: an alias for `Reg<TASKS_STOP_SPEC>`"]
51pub type TASKS_STOP = crate::Reg<tasks_stop::TASKS_STOP_SPEC>;
52#[doc = "Stop the comparator."]
53pub mod tasks_stop;
54#[doc = "TASKS_SAMPLE (w) register accessor: an alias for `Reg<TASKS_SAMPLE_SPEC>`"]
55pub type TASKS_SAMPLE = crate::Reg<tasks_sample::TASKS_SAMPLE_SPEC>;
56#[doc = "Sample comparator value."]
57pub mod tasks_sample;
58#[doc = "EVENTS_READY (rw) register accessor: an alias for `Reg<EVENTS_READY_SPEC>`"]
59pub type EVENTS_READY = crate::Reg<events_ready::EVENTS_READY_SPEC>;
60#[doc = "LPCOMP is ready and output is valid."]
61pub mod events_ready;
62#[doc = "EVENTS_DOWN (rw) register accessor: an alias for `Reg<EVENTS_DOWN_SPEC>`"]
63pub type EVENTS_DOWN = crate::Reg<events_down::EVENTS_DOWN_SPEC>;
64#[doc = "Input voltage crossed the threshold going down."]
65pub mod events_down;
66#[doc = "EVENTS_UP (rw) register accessor: an alias for `Reg<EVENTS_UP_SPEC>`"]
67pub type EVENTS_UP = crate::Reg<events_up::EVENTS_UP_SPEC>;
68#[doc = "Input voltage crossed the threshold going up."]
69pub mod events_up;
70#[doc = "EVENTS_CROSS (rw) register accessor: an alias for `Reg<EVENTS_CROSS_SPEC>`"]
71pub type EVENTS_CROSS = crate::Reg<events_cross::EVENTS_CROSS_SPEC>;
72#[doc = "Input voltage crossed the threshold in any direction."]
73pub mod events_cross;
74#[doc = "SHORTS (rw) register accessor: an alias for `Reg<SHORTS_SPEC>`"]
75pub type SHORTS = crate::Reg<shorts::SHORTS_SPEC>;
76#[doc = "Shortcuts for the LPCOMP."]
77pub mod shorts;
78#[doc = "INTENSET (rw) register accessor: an alias for `Reg<INTENSET_SPEC>`"]
79pub type INTENSET = crate::Reg<intenset::INTENSET_SPEC>;
80#[doc = "Interrupt enable set register."]
81pub mod intenset;
82#[doc = "INTENCLR (rw) register accessor: an alias for `Reg<INTENCLR_SPEC>`"]
83pub type INTENCLR = crate::Reg<intenclr::INTENCLR_SPEC>;
84#[doc = "Interrupt enable clear register."]
85pub mod intenclr;
86#[doc = "RESULT (r) register accessor: an alias for `Reg<RESULT_SPEC>`"]
87pub type RESULT = crate::Reg<result::RESULT_SPEC>;
88#[doc = "Result of last compare."]
89pub mod result;
90#[doc = "ENABLE (rw) register accessor: an alias for `Reg<ENABLE_SPEC>`"]
91pub type ENABLE = crate::Reg<enable::ENABLE_SPEC>;
92#[doc = "Enable the LPCOMP."]
93pub mod enable;
94#[doc = "PSEL (rw) register accessor: an alias for `Reg<PSEL_SPEC>`"]
95pub type PSEL = crate::Reg<psel::PSEL_SPEC>;
96#[doc = "Input pin select."]
97pub mod psel;
98#[doc = "REFSEL (rw) register accessor: an alias for `Reg<REFSEL_SPEC>`"]
99pub type REFSEL = crate::Reg<refsel::REFSEL_SPEC>;
100#[doc = "Reference select."]
101pub mod refsel;
102#[doc = "EXTREFSEL (rw) register accessor: an alias for `Reg<EXTREFSEL_SPEC>`"]
103pub type EXTREFSEL = crate::Reg<extrefsel::EXTREFSEL_SPEC>;
104#[doc = "External reference select."]
105pub mod extrefsel;
106#[doc = "ANADETECT (rw) register accessor: an alias for `Reg<ANADETECT_SPEC>`"]
107pub type ANADETECT = crate::Reg<anadetect::ANADETECT_SPEC>;
108#[doc = "Analog detect configuration."]
109pub mod anadetect;
110#[doc = "POWER (rw) register accessor: an alias for `Reg<POWER_SPEC>`"]
111pub type POWER = crate::Reg<power::POWER_SPEC>;
112#[doc = "Peripheral power control."]
113pub mod power;