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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
#[doc = r" Register block"]
#[repr(C)]
pub struct RegisterBlock {
    #[doc = "0x00 - Task starting the quadrature decoder"]
    pub tasks_start: TASKS_START,
    #[doc = "0x04 - Task stopping the quadrature decoder"]
    pub tasks_stop: TASKS_STOP,
    #[doc = "0x08 - Read and clear ACC and ACCDBL"]
    pub tasks_readclracc: TASKS_READCLRACC,
    #[doc = "0x0c - Read and clear ACC"]
    pub tasks_rdclracc: TASKS_RDCLRACC,
    #[doc = "0x10 - Read and clear ACCDBL"]
    pub tasks_rdclrdbl: TASKS_RDCLRDBL,
    _reserved0: [u8; 236usize],
    #[doc = "0x100 - Event being generated for every new sample value written to the SAMPLE register"]
    pub events_samplerdy: EVENTS_SAMPLERDY,
    #[doc = "0x104 - Non-null report ready"]
    pub events_reportrdy: EVENTS_REPORTRDY,
    #[doc = "0x108 - ACC or ACCDBL register overflow"]
    pub events_accof: EVENTS_ACCOF,
    #[doc = "0x10c - Double displacement(s) detected"]
    pub events_dblrdy: EVENTS_DBLRDY,
    #[doc = "0x110 - QDEC has been stopped"]
    pub events_stopped: EVENTS_STOPPED,
    _reserved1: [u8; 236usize],
    #[doc = "0x200 - Shortcuts between local events and tasks"]
    pub shorts: SHORTS,
    _reserved2: [u8; 256usize],
    #[doc = "0x304 - Enable interrupt"]
    pub intenset: INTENSET,
    #[doc = "0x308 - Disable interrupt"]
    pub intenclr: INTENCLR,
    _reserved3: [u8; 500usize],
    #[doc = "0x500 - Enable the quadrature decoder"]
    pub enable: ENABLE,
    #[doc = "0x504 - LED output pin polarity"]
    pub ledpol: LEDPOL,
    #[doc = "0x508 - Sample period"]
    pub sampleper: SAMPLEPER,
    #[doc = "0x50c - Motion sample value"]
    pub sample: SAMPLE,
    #[doc = "0x510 - Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"]
    pub reportper: REPORTPER,
    #[doc = "0x514 - Register accumulating the valid transitions"]
    pub acc: ACC,
    #[doc = "0x518 - Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"]
    pub accread: ACCREAD,
    #[doc = "0x51c - Unspecified"]
    pub psel: PSEL,
    #[doc = "0x528 - Enable input debounce filters"]
    pub dbfen: DBFEN,
    _reserved4: [u8; 20usize],
    #[doc = "0x540 - Time period the LED is switched ON prior to sampling"]
    pub ledpre: LEDPRE,
    #[doc = "0x544 - Register accumulating the number of detected double transitions"]
    pub accdbl: ACCDBL,
    #[doc = "0x548 - Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"]
    pub accdblread: ACCDBLREAD,
}
#[doc = r" Register block"]
#[repr(C)]
pub struct PSEL {
    #[doc = "0x00 - Pin select for LED signal"]
    pub led: self::psel::LED,
    #[doc = "0x04 - Pin select for A signal"]
    pub a: self::psel::A,
    #[doc = "0x08 - Pin select for B signal"]
    pub b: self::psel::B,
}
#[doc = r" Register block"]
#[doc = "Unspecified"]
pub mod psel;
#[doc = "Task starting the quadrature decoder"]
pub struct TASKS_START {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Task starting the quadrature decoder"]
pub mod tasks_start;
#[doc = "Task stopping the quadrature decoder"]
pub struct TASKS_STOP {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Task stopping the quadrature decoder"]
pub mod tasks_stop;
#[doc = "Read and clear ACC and ACCDBL"]
pub struct TASKS_READCLRACC {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Read and clear ACC and ACCDBL"]
pub mod tasks_readclracc;
#[doc = "Read and clear ACC"]
pub struct TASKS_RDCLRACC {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Read and clear ACC"]
pub mod tasks_rdclracc;
#[doc = "Read and clear ACCDBL"]
pub struct TASKS_RDCLRDBL {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Read and clear ACCDBL"]
pub mod tasks_rdclrdbl;
#[doc = "Event being generated for every new sample value written to the SAMPLE register"]
pub struct EVENTS_SAMPLERDY {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Event being generated for every new sample value written to the SAMPLE register"]
pub mod events_samplerdy;
#[doc = "Non-null report ready"]
pub struct EVENTS_REPORTRDY {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Non-null report ready"]
pub mod events_reportrdy;
#[doc = "ACC or ACCDBL register overflow"]
pub struct EVENTS_ACCOF {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "ACC or ACCDBL register overflow"]
pub mod events_accof;
#[doc = "Double displacement(s) detected"]
pub struct EVENTS_DBLRDY {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Double displacement(s) detected"]
pub mod events_dblrdy;
#[doc = "QDEC has been stopped"]
pub struct EVENTS_STOPPED {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "QDEC has been stopped"]
pub mod events_stopped;
#[doc = "Shortcuts between local events and tasks"]
pub struct SHORTS {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Shortcuts between local events and tasks"]
pub mod shorts;
#[doc = "Enable interrupt"]
pub struct INTENSET {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Enable interrupt"]
pub mod intenset;
#[doc = "Disable interrupt"]
pub struct INTENCLR {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Disable interrupt"]
pub mod intenclr;
#[doc = "Enable the quadrature decoder"]
pub struct ENABLE {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Enable the quadrature decoder"]
pub mod enable;
#[doc = "LED output pin polarity"]
pub struct LEDPOL {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "LED output pin polarity"]
pub mod ledpol;
#[doc = "Sample period"]
pub struct SAMPLEPER {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Sample period"]
pub mod sampleper;
#[doc = "Motion sample value"]
pub struct SAMPLE {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Motion sample value"]
pub mod sample;
#[doc = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"]
pub struct REPORTPER {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated"]
pub mod reportper;
#[doc = "Register accumulating the valid transitions"]
pub struct ACC {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Register accumulating the valid transitions"]
pub mod acc;
#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"]
pub struct ACCREAD {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task"]
pub mod accread;
#[doc = "Enable input debounce filters"]
pub struct DBFEN {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Enable input debounce filters"]
pub mod dbfen;
#[doc = "Time period the LED is switched ON prior to sampling"]
pub struct LEDPRE {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Time period the LED is switched ON prior to sampling"]
pub mod ledpre;
#[doc = "Register accumulating the number of detected double transitions"]
pub struct ACCDBL {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Register accumulating the number of detected double transitions"]
pub mod accdbl;
#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"]
pub struct ACCDBLREAD {
    register: ::vcell::VolatileCell<u32>,
}
#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task"]
pub mod accdblread;