Quadrature Decoder (QDEC) peripheral driver.
More...
Quadrature Decoder (QDEC) peripheral driver.
#define NRFX_QDEC_DEFAULT_CONFIG |
Value:
QDEC default configuration.
QDEC event handler.
- Parameters
-
[in] | event | QDEC event structure. |
void nrfx_qdec_accumulators_read |
( |
int16_t * |
p_acc, |
|
|
int16_t * |
p_accdbl |
|
) |
| |
Function for reading accumulated transitions from the QDEC peripheral.
- Note
- Function asserts if module is not enabled.
-
Accumulators are cleared after reading.
- Parameters
-
[out] | p_acc | Pointer to store the accumulated transitions. |
[out] | p_accdbl | Pointer to store the accumulated double transitions. |
void nrfx_qdec_disable |
( |
void |
| ) |
|
Function for disabling QDEC.
- Note
- Function asserts if module is uninitialized or disabled.
void nrfx_qdec_enable |
( |
void |
| ) |
|
Function for enabling QDEC.
- Note
- Function asserts if module is uninitialized or enabled.
Function for returning the address of the specified QDEC event.
- Parameters
-
- Returns
- Event address.
Function for initializing QDEC.
- Parameters
-
[in] | p_config | Pointer to the structure with the initial configuration. |
[in] | event_handler | Event handler provided by the user. Must not be NULL. |
- Return values
-
NRFX_SUCCESS | Initialization was successful. |
NRFX_ERROR_INVALID_STATE | The QDEC was already initialized. |
__STATIC_INLINE uint32_t nrfx_qdec_task_address_get |
( |
nrf_qdec_task_t |
task | ) |
|
Function for returning the address of the specified QDEC task.
- Parameters
-
- Returns
- Task address.
void nrfx_qdec_uninit |
( |
void |
| ) |
|
Function for uninitializing QDEC.
- Note
- Function asserts if module is uninitialized.