Quadrature decoder (QDEC) driver.
More...
Quadrature decoder (QDEC) driver.
#define NRF_DRV_QDEC_DEFAULT_CONFIG |
Value:
QDEC default configuration.
QDEC event handler.
- Parameters
-
[in] | event | QDEC event structure. |
void nrf_drv_qdec_accumulators_read |
( |
int16_t * |
p_acc, |
|
|
int16_t * |
p_accdbl |
|
) |
| |
Function for reading accumulated transitions QDEC.
- Note
- Function asserts if module is not enabled.
-
Accumulators are cleared after reading.
- Parameters
-
[out] | p_acc | Pointer to store accumulated transitions. |
[out] | p_accdbl | Pointer to store accumulated double transitions. |
void nrf_drv_qdec_disable |
( |
void |
| ) |
|
Function for disabling QDEC.
- Note
- Function asserts if module is uninitialized or disabled.
void nrf_drv_qdec_enable |
( |
void |
| ) |
|
Function for enabling QDEC.
- Note
- Function asserts if module is uninitialized or enabled.
void nrf_drv_qdec_event_address_get |
( |
nrf_qdec_event_t |
event, |
|
|
uint32_t * |
p_event |
|
) |
| |
Function for returning the address of a specific timer event.
- Parameters
-
[in] | event | QDEC event. |
[out] | p_event | Event address. |
Function for initializing QDEC.
- Parameters
-
[in] | p_config | Pointer to configuration parameters. |
[in] | event_handler | Event handler function. |
- Return values
-
NRF_SUCCESS | If initialization was successful. |
NRF_ERROR_INVALID_PARAM | If invalid parameters were supplied. |
NRF_ERROR_INVALID_STATE | If QDEC was already initialized. |
void nrf_drv_qdec_task_address_get |
( |
nrf_qdec_task_t |
task, |
|
|
uint32_t * |
p_task |
|
) |
| |
Function for returning the address of a specific timer task.
- Parameters
-
[in] | task | QDEC task. |
[out] | p_task | Task address. |
void nrf_drv_qdec_uninit |
( |
void |
| ) |
|
Function for uninitializing QDEC.
- Note
- Function asserts if module is uninitialized.