1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#![allow(non_snake_case, non_upper_case_globals)]
#![allow(non_camel_case_types)]
//! EWM
//!
//! Used by: imxrt1061, imxrt1062, imxrt1064
use crate::RWRegister;
#[cfg(not(feature = "nosync"))]
use core::marker::PhantomData;
/// Control Register
pub mod CTRL {
/// EWM enable.
pub mod EWMEN {
/// Offset (0 bits)
pub const offset: u8 = 0;
/// Mask (1 bit: 1 << 0)
pub const mask: u8 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// EWM_in's Assertion State Select.
pub mod ASSIN {
/// Offset (1 bits)
pub const offset: u8 = 1;
/// Mask (1 bit: 1 << 1)
pub const mask: u8 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// Input Enable.
pub mod INEN {
/// Offset (2 bits)
pub const offset: u8 = 2;
/// Mask (1 bit: 1 << 2)
pub const mask: u8 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
/// Interrupt Enable.
pub mod INTEN {
/// Offset (3 bits)
pub const offset: u8 = 3;
/// Mask (1 bit: 1 << 3)
pub const mask: u8 = 1 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// Service Register
pub mod SERV {
/// SERVICE
pub mod SERVICE {
/// Offset (0 bits)
pub const offset: u8 = 0;
/// Mask (8 bits: 0xff << 0)
pub const mask: u8 = 0xff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// Compare Low Register
pub mod CMPL {
/// COMPAREL
pub mod COMPAREL {
/// Offset (0 bits)
pub const offset: u8 = 0;
/// Mask (8 bits: 0xff << 0)
pub const mask: u8 = 0xff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// Compare High Register
pub mod CMPH {
/// COMPAREH
pub mod COMPAREH {
/// Offset (0 bits)
pub const offset: u8 = 0;
/// Mask (8 bits: 0xff << 0)
pub const mask: u8 = 0xff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// Clock Control Register
pub mod CLKCTRL {
/// CLKSEL
pub mod CLKSEL {
/// Offset (0 bits)
pub const offset: u8 = 0;
/// Mask (2 bits: 0b11 << 0)
pub const mask: u8 = 0b11 << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
/// Clock Prescaler Register
pub mod CLKPRESCALER {
/// CLK_DIV
pub mod CLK_DIV {
/// Offset (0 bits)
pub const offset: u8 = 0;
/// Mask (8 bits: 0xff << 0)
pub const mask: u8 = 0xff << offset;
/// Read-only values (empty)
pub mod R {}
/// Write-only values (empty)
pub mod W {}
/// Read-write values (empty)
pub mod RW {}
}
}
#[repr(C)]
pub struct RegisterBlock {
/// Control Register
pub CTRL: RWRegister<u8>,
/// Service Register
pub SERV: RWRegister<u8>,
/// Compare Low Register
pub CMPL: RWRegister<u8>,
/// Compare High Register
pub CMPH: RWRegister<u8>,
/// Clock Control Register
pub CLKCTRL: RWRegister<u8>,
/// Clock Prescaler Register
pub CLKPRESCALER: RWRegister<u8>,
}
pub struct ResetValues {
pub CTRL: u8,
pub SERV: u8,
pub CMPL: u8,
pub CMPH: u8,
pub CLKCTRL: u8,
pub CLKPRESCALER: u8,
}
#[cfg(not(feature = "nosync"))]
pub struct Instance {
pub(crate) addr: u32,
pub(crate) _marker: PhantomData<*const RegisterBlock>,
}
#[cfg(not(feature = "nosync"))]
impl ::core::ops::Deref for Instance {
type Target = RegisterBlock;
#[inline(always)]
fn deref(&self) -> &RegisterBlock {
unsafe { &*(self.addr as *const _) }
}
}
#[cfg(feature = "rtfm")]
unsafe impl Send for Instance {}