nRF51 SDK - S120 SoftDevice
|
Quadrature decoder (QDEC) driver. More...
Data Structures | |
struct | nrf_drv_qdec_config_t |
QDEC configuration structure. More... | |
struct | nrf_drv_qdec_sample_data_evt_t |
QDEC sample event data. More... | |
struct | nrf_drv_qdec_report_data_evt_t |
QDEC report event data. More... | |
struct | nrf_drv_qdec_event_t |
QDEC event handler structure. More... | |
Macros | |
#define | NRF_DRV_QDEC_DEFAULT_CONFIG |
QDEC default configuration. More... | |
Typedefs | |
typedef void(* | qdec_event_handler_t )(nrf_drv_qdec_event_t event) |
QDEC event handler. More... | |
Functions | |
ret_code_t | nrf_drv_qdec_init (nrf_drv_qdec_config_t const *p_config, qdec_event_handler_t event_handler) |
Function for initializing QDEC. More... | |
void | nrf_drv_qdec_uninit (void) |
Function for uninitializing QDEC. More... | |
void | nrf_drv_qdec_enable (void) |
Function for enabling QDEC. More... | |
void | nrf_drv_qdec_disable (void) |
Function for disabling QDEC. More... | |
void | nrf_drv_qdec_accumulators_read (int16_t *p_acc, int16_t *p_accdbl) |
Function for reading accumulated transitions QDEC. More... | |
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. More... | |
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. More... | |
Quadrature decoder (QDEC) driver.
#define NRF_DRV_QDEC_DEFAULT_CONFIG |
QDEC default configuration.
typedef void(* qdec_event_handler_t)(nrf_drv_qdec_event_t event) |
QDEC event handler.
[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.
[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.
void nrf_drv_qdec_enable | ( | void | ) |
Function for enabling QDEC.
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.
[in] | event | QDEC event. |
[out] | p_event | Event address. |
ret_code_t nrf_drv_qdec_init | ( | nrf_drv_qdec_config_t const * | p_config, |
qdec_event_handler_t | event_handler | ||
) |
Function for initializing QDEC.
[in] | p_config | Pointer to configuration parameters. |
[in] | event_handler | Event handler function. |
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.
[in] | task | QDEC task. |
[out] | p_task | Task address. |
void nrf_drv_qdec_uninit | ( | void | ) |
Function for uninitializing QDEC.