![]() |
nRF5 SDK
v15.3.0
|
Choose documentation: | nRF5 SDK | S112 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
Quadrature Decoder (QDEC) peripheral driver. More...
Modules | |
QDEC peripheral driver configuration | |
Data Structures | |
struct | nrfx_qdec_config_t |
QDEC configuration structure. More... | |
struct | nrfx_qdec_sample_data_evt_t |
QDEC sample event data. More... | |
struct | nrfx_qdec_report_data_evt_t |
QDEC report event data. More... | |
struct | nrfx_qdec_event_t |
QDEC event handler structure. More... | |
Macros | |
#define | NRFX_QDEC_DEFAULT_CONFIG |
QDEC default configuration. More... | |
Typedefs | |
typedef void(* | nrfx_qdec_event_handler_t )(nrfx_qdec_event_t event) |
QDEC event handler. More... | |
Functions | |
nrfx_err_t | nrfx_qdec_init (nrfx_qdec_config_t const *p_config, nrfx_qdec_event_handler_t event_handler) |
Function for initializing QDEC. More... | |
void | nrfx_qdec_uninit (void) |
Function for uninitializing QDEC. More... | |
void | nrfx_qdec_enable (void) |
Function for enabling QDEC. More... | |
void | nrfx_qdec_disable (void) |
Function for disabling QDEC. More... | |
void | nrfx_qdec_accumulators_read (int16_t *p_acc, int16_t *p_accdbl) |
Function for reading accumulated transitions QDEC. More... | |
__STATIC_INLINE uint32_t | nrfx_qdec_task_address_get (nrf_qdec_task_t task) |
Function for returning the address of a specific QDEC task. More... | |
__STATIC_INLINE uint32_t | nrfx_qdec_event_address_get (nrf_qdec_event_t event) |
Function for returning the address of a specific QDEC event. More... | |
void | nrfx_qdec_irq_handler (void) |
Quadrature Decoder (QDEC) peripheral driver.
#define NRFX_QDEC_DEFAULT_CONFIG |
QDEC default configuration.
typedef void(* nrfx_qdec_event_handler_t)(nrfx_qdec_event_t event) |
QDEC event handler.
[in] | event | QDEC event structure. |
void nrfx_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 nrfx_qdec_disable | ( | void | ) |
Function for disabling QDEC.
void nrfx_qdec_enable | ( | void | ) |
Function for enabling QDEC.
__STATIC_INLINE uint32_t nrfx_qdec_event_address_get | ( | nrf_qdec_event_t | event | ) |
Function for returning the address of a specific QDEC event.
event | QDEC event. |
nrfx_err_t nrfx_qdec_init | ( | nrfx_qdec_config_t const * | p_config, |
nrfx_qdec_event_handler_t | event_handler | ||
) |
Function for initializing QDEC.
[in] | p_config | Pointer to the structure with initial configuration. |
[in] | event_handler | Event handler provided by the user. Must not be NULL. |
NRFX_SUCCESS | If initialization was successful. |
NRFX_ERROR_INVALID_STATE | If QDEC was already initialized. |
__STATIC_INLINE uint32_t nrfx_qdec_task_address_get | ( | nrf_qdec_task_t | task | ) |
Function for returning the address of a specific QDEC task.
task | QDEC task. |
void nrfx_qdec_uninit | ( | void | ) |
Function for uninitializing QDEC.