#[repr(C)]pub struct RegisterBlock {Show 25 fields
pub tasks_start: TASKS_START,
pub tasks_stop: TASKS_STOP,
pub tasks_readclracc: TASKS_READCLRACC,
pub tasks_rdclracc: TASKS_RDCLRACC,
pub tasks_rdclrdbl: TASKS_RDCLRDBL,
pub events_samplerdy: EVENTS_SAMPLERDY,
pub events_reportrdy: EVENTS_REPORTRDY,
pub events_accof: EVENTS_ACCOF,
pub events_dblrdy: EVENTS_DBLRDY,
pub events_stopped: EVENTS_STOPPED,
pub shorts: SHORTS,
pub intenset: INTENSET,
pub intenclr: INTENCLR,
pub enable: ENABLE,
pub ledpol: LEDPOL,
pub sampleper: SAMPLEPER,
pub sample: SAMPLE,
pub reportper: REPORTPER,
pub acc: ACC,
pub accread: ACCREAD,
pub psel: PSEL,
pub dbfen: DBFEN,
pub ledpre: LEDPRE,
pub accdbl: ACCDBL,
pub accdblread: ACCDBLREAD,
/* private fields */
}Expand description
Register block
Fields§
§tasks_start: TASKS_START0x00 - Task starting the quadrature decoder
tasks_stop: TASKS_STOP0x04 - Task stopping the quadrature decoder
tasks_readclracc: TASKS_READCLRACC0x08 - Read and clear ACC and ACCDBL
tasks_rdclracc: TASKS_RDCLRACC0x0c - Read and clear ACC
tasks_rdclrdbl: TASKS_RDCLRDBL0x10 - Read and clear ACCDBL
events_samplerdy: EVENTS_SAMPLERDY0x100 - Event being generated for every new sample value written to the SAMPLE register
events_reportrdy: EVENTS_REPORTRDY0x104 - Non-null report ready
events_accof: EVENTS_ACCOF0x108 - ACC or ACCDBL register overflow
events_dblrdy: EVENTS_DBLRDY0x10c - Double displacement(s) detected
events_stopped: EVENTS_STOPPED0x110 - QDEC has been stopped
shorts: SHORTS0x200 - Shortcut register
intenset: INTENSET0x304 - Enable interrupt
intenclr: INTENCLR0x308 - Disable interrupt
enable: ENABLE0x500 - Enable the quadrature decoder
ledpol: LEDPOL0x504 - LED output pin polarity
sampleper: SAMPLEPER0x508 - Sample period
sample: SAMPLE0x50c - Motion sample value
reportper: REPORTPER0x510 - Number of samples to be taken before REPORTRDY and DBLRDY events can be generated
acc: ACC0x514 - Register accumulating the valid transitions
accread: ACCREAD0x518 - Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task
psel: PSEL0x51c..0x528 - Unspecified
dbfen: DBFEN0x528 - Enable input debounce filters
ledpre: LEDPRE0x540 - Time period the LED is switched ON prior to sampling
accdbl: ACCDBL0x544 - Register accumulating the number of detected double transitions
accdblread: ACCDBLREAD0x548 - Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task