1#[doc = r"Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 _reserved_0_mode0: [u8; 160usize],
5}
6impl RegisterBlock {
7 #[doc = "0x00 - Clock/Calendar with Alarm"]
8 #[inline(always)]
9 pub fn mode2(&self) -> &MODE2 {
10 unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const MODE2) }
11 }
12 #[doc = "0x00 - Clock/Calendar with Alarm"]
13 #[inline(always)]
14 pub fn mode2_mut(&self) -> &mut MODE2 {
15 unsafe { &mut *(((self as *const Self) as *mut u8).add(0usize) as *mut MODE2) }
16 }
17 #[doc = "0x00 - 16-bit Counter with Two 16-bit Compares"]
18 #[inline(always)]
19 pub fn mode1(&self) -> &MODE1 {
20 unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const MODE1) }
21 }
22 #[doc = "0x00 - 16-bit Counter with Two 16-bit Compares"]
23 #[inline(always)]
24 pub fn mode1_mut(&self) -> &mut MODE1 {
25 unsafe { &mut *(((self as *const Self) as *mut u8).add(0usize) as *mut MODE1) }
26 }
27 #[doc = "0x00 - 32-bit Counter with Single 32-bit Compare"]
28 #[inline(always)]
29 pub fn mode0(&self) -> &MODE0 {
30 unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const MODE0) }
31 }
32 #[doc = "0x00 - 32-bit Counter with Single 32-bit Compare"]
33 #[inline(always)]
34 pub fn mode0_mut(&self) -> &mut MODE0 {
35 unsafe { &mut *(((self as *const Self) as *mut u8).add(0usize) as *mut MODE0) }
36 }
37}
38#[doc = r"Register block"]
39#[repr(C)]
40pub struct MODE0 {
41 #[doc = "0x00 - MODE0 Control A"]
42 pub ctrla: self::mode0::CTRLA,
43 #[doc = "0x02 - MODE0 Control B"]
44 pub ctrlb: self::mode0::CTRLB,
45 #[doc = "0x04 - MODE0 Event Control"]
46 pub evctrl: self::mode0::EVCTRL,
47 #[doc = "0x08 - MODE0 Interrupt Enable Clear"]
48 pub intenclr: self::mode0::INTENCLR,
49 #[doc = "0x0a - MODE0 Interrupt Enable Set"]
50 pub intenset: self::mode0::INTENSET,
51 #[doc = "0x0c - MODE0 Interrupt Flag Status and Clear"]
52 pub intflag: self::mode0::INTFLAG,
53 #[doc = "0x0e - Debug Control"]
54 pub dbgctrl: self::mode0::DBGCTRL,
55 _reserved7: [u8; 1usize],
56 #[doc = "0x10 - MODE0 Synchronization Busy Status"]
57 pub syncbusy: self::mode0::SYNCBUSY,
58 #[doc = "0x14 - Frequency Correction"]
59 pub freqcorr: self::mode0::FREQCORR,
60 _reserved9: [u8; 3usize],
61 #[doc = "0x18 - MODE0 Counter Value"]
62 pub count: self::mode0::COUNT,
63 _reserved10: [u8; 4usize],
64 #[doc = "0x20 - MODE0 Compare n Value"]
65 pub comp: [self::mode0::COMP; 2],
66 _reserved11: [u8; 24usize],
67 #[doc = "0x40 - General Purpose"]
68 pub gp: [self::mode0::GP; 4],
69 _reserved12: [u8; 16usize],
70 #[doc = "0x60 - Tamper Control"]
71 pub tampctrl: self::mode0::TAMPCTRL,
72 #[doc = "0x64 - MODE0 Timestamp"]
73 pub timestamp: self::mode0::TIMESTAMP,
74 #[doc = "0x68 - Tamper ID"]
75 pub tampid: self::mode0::TAMPID,
76 _reserved15: [u8; 20usize],
77 #[doc = "0x80 - Backup"]
78 pub bkup: [self::mode0::BKUP; 8],
79}
80#[doc = r"Register block"]
81#[doc = "32-bit Counter with Single 32-bit Compare"]
82pub mod mode0;
83#[doc = r"Register block"]
84#[repr(C)]
85pub struct MODE1 {
86 #[doc = "0x00 - MODE1 Control A"]
87 pub ctrla: self::mode1::CTRLA,
88 #[doc = "0x02 - MODE1 Control B"]
89 pub ctrlb: self::mode1::CTRLB,
90 #[doc = "0x04 - MODE1 Event Control"]
91 pub evctrl: self::mode1::EVCTRL,
92 #[doc = "0x08 - MODE1 Interrupt Enable Clear"]
93 pub intenclr: self::mode1::INTENCLR,
94 #[doc = "0x0a - MODE1 Interrupt Enable Set"]
95 pub intenset: self::mode1::INTENSET,
96 #[doc = "0x0c - MODE1 Interrupt Flag Status and Clear"]
97 pub intflag: self::mode1::INTFLAG,
98 #[doc = "0x0e - Debug Control"]
99 pub dbgctrl: self::mode1::DBGCTRL,
100 _reserved7: [u8; 1usize],
101 #[doc = "0x10 - MODE1 Synchronization Busy Status"]
102 pub syncbusy: self::mode1::SYNCBUSY,
103 #[doc = "0x14 - Frequency Correction"]
104 pub freqcorr: self::mode1::FREQCORR,
105 _reserved9: [u8; 3usize],
106 #[doc = "0x18 - MODE1 Counter Value"]
107 pub count: self::mode1::COUNT,
108 _reserved10: [u8; 2usize],
109 #[doc = "0x1c - MODE1 Counter Period"]
110 pub per: self::mode1::PER,
111 _reserved11: [u8; 2usize],
112 #[doc = "0x20 - MODE1 Compare n Value"]
113 pub comp: [self::mode1::COMP; 4],
114 _reserved12: [u8; 24usize],
115 #[doc = "0x40 - General Purpose"]
116 pub gp: [self::mode1::GP; 4],
117 _reserved13: [u8; 16usize],
118 #[doc = "0x60 - Tamper Control"]
119 pub tampctrl: self::mode1::TAMPCTRL,
120 #[doc = "0x64 - MODE1 Timestamp"]
121 pub timestamp: self::mode1::TIMESTAMP,
122 #[doc = "0x68 - Tamper ID"]
123 pub tampid: self::mode1::TAMPID,
124 _reserved16: [u8; 20usize],
125 #[doc = "0x80 - Backup"]
126 pub bkup: [self::mode1::BKUP; 8],
127}
128#[doc = r"Register block"]
129#[doc = "16-bit Counter with Two 16-bit Compares"]
130pub mod mode1;
131#[doc = r"Register block"]
132#[repr(C)]
133pub struct MODE2 {
134 #[doc = "0x00 - MODE2 Control A"]
135 pub ctrla: self::mode2::CTRLA,
136 #[doc = "0x02 - MODE2 Control B"]
137 pub ctrlb: self::mode2::CTRLB,
138 #[doc = "0x04 - MODE2 Event Control"]
139 pub evctrl: self::mode2::EVCTRL,
140 #[doc = "0x08 - MODE2 Interrupt Enable Clear"]
141 pub intenclr: self::mode2::INTENCLR,
142 #[doc = "0x0a - MODE2 Interrupt Enable Set"]
143 pub intenset: self::mode2::INTENSET,
144 #[doc = "0x0c - MODE2 Interrupt Flag Status and Clear"]
145 pub intflag: self::mode2::INTFLAG,
146 #[doc = "0x0e - Debug Control"]
147 pub dbgctrl: self::mode2::DBGCTRL,
148 _reserved7: [u8; 1usize],
149 #[doc = "0x10 - MODE2 Synchronization Busy Status"]
150 pub syncbusy: self::mode2::SYNCBUSY,
151 #[doc = "0x14 - Frequency Correction"]
152 pub freqcorr: self::mode2::FREQCORR,
153 _reserved9: [u8; 3usize],
154 #[doc = "0x18 - MODE2 Clock Value"]
155 pub clock: self::mode2::CLOCK,
156 _reserved10: [u8; 4usize],
157 #[doc = "0x20 - MODE2_ALARM Alarm n Value"]
158 pub alarm0: self::mode2::ALARM0,
159 #[doc = "0x24 - MODE2_ALARM Alarm n Mask"]
160 pub mask0: self::mode2::MASK0,
161 _reserved12: [u8; 3usize],
162 #[doc = "0x28 - MODE2_ALARM Alarm n Value"]
163 pub alarm1: self::mode2::ALARM1,
164 #[doc = "0x2c - MODE2_ALARM Alarm n Mask"]
165 pub mask1: self::mode2::MASK1,
166 _reserved14: [u8; 19usize],
167 #[doc = "0x40 - General Purpose"]
168 pub gp: [self::mode2::GP; 4],
169 _reserved15: [u8; 16usize],
170 #[doc = "0x60 - Tamper Control"]
171 pub tampctrl: self::mode2::TAMPCTRL,
172 #[doc = "0x64 - MODE2 Timestamp"]
173 pub timestamp: self::mode2::TIMESTAMP,
174 #[doc = "0x68 - Tamper ID"]
175 pub tampid: self::mode2::TAMPID,
176 _reserved18: [u8; 20usize],
177 #[doc = "0x80 - Backup"]
178 pub bkup: [self::mode2::BKUP; 8],
179}
180#[doc = r"Register block"]
181#[doc = "Clock/Calendar with Alarm"]
182pub mod mode2;