![]() |
nrfx 4.5.0
|
Hardware access layer with cache and barrier support for managing the QDEC peripheral. More...
Data Structures | |
| struct | nrfy_qdec_pins_t |
| Configuration structure for QDEC pins. More... | |
| struct | nrfy_qdec_config_t |
| QDEC configuration structure. More... | |
Functions | |
| NRFY_STATIC_INLINE void | nrfy_qdec_periph_configure (NRF_QDEC_Type *p_reg, nrfy_qdec_config_t const *p_config) |
| Function for configuring the QDEC. | |
| NRFY_STATIC_INLINE void | nrfy_qdec_int_init (NRF_QDEC_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable) |
| Function for initializing the specified QDEC interrupts. | |
| NRFY_STATIC_INLINE void | nrfy_qdec_int_uninit (NRF_QDEC_Type *p_reg) |
| Function for uninitializing the QDEC interrupts. | |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_events_process (NRF_QDEC_Type *p_reg, uint32_t mask) |
| Function for processing the specified QDEC events. | |
| NRFY_STATIC_INLINE void | nrfy_qdec_accumulators_read (NRF_QDEC_Type const *p_reg, int32_t *p_acc, uint32_t *p_accdbl) |
| Function for reading QDEC accumulators. | |
| NRFY_STATIC_INLINE void | nrfy_qdec_pins_get (NRF_QDEC_Type const *p_reg, nrfy_qdec_pins_t *p_pins) |
| Function for reading QDEC pins. | |
| NRFY_STATIC_INLINE void | nrfy_qdec_pins_set (NRF_QDEC_Type *p_reg, nrfy_qdec_pins_t const *p_pins) |
| Function for setting QDEC pins. | |
| NRFY_STATIC_INLINE void | nrfy_qdec_enable (NRF_QDEC_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_qdec_disable (NRF_QDEC_Type *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_enable_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_qdec_int_enable (NRF_QDEC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_qdec_int_disable (NRF_QDEC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_int_enable_check (NRF_QDEC_Type const *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_qdec_dbfen_enable (NRF_QDEC_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_qdec_dbfen_disable (NRF_QDEC_Type *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_dbfen_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_a_pin_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_b_pin_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_led_pin_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_qdec_task_trigger (NRF_QDEC_Type *p_reg, nrf_qdec_task_t task) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_task_address_get (NRF_QDEC_Type const *p_reg, nrf_qdec_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_qdec_event_clear (NRF_QDEC_Type *p_reg, nrf_qdec_event_t event) |
| NRFY_STATIC_INLINE bool | nrfy_qdec_event_check (NRF_QDEC_Type const *p_reg, nrf_qdec_event_t event) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_event_address_get (NRF_QDEC_Type const *p_reg, nrf_qdec_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_qdec_shorts_enable (NRF_QDEC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_qdec_shorts_disable (NRF_QDEC_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_sampleper_to_value (nrf_qdec_sampleper_t sampleper) |
| NRFY_STATIC_INLINE void | nrfy_qdec_sampleper_set (NRF_QDEC_Type *p_reg, nrf_qdec_sampleper_t sampleper) |
| NRFY_STATIC_INLINE nrf_qdec_sampleper_t | nrfy_qdec_sampleper_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE int32_t | nrfy_qdec_sample_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE int32_t | nrfy_qdec_acc_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE int32_t | nrfy_qdec_accread_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_accdbl_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_accdblread_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_qdec_ledpre_set (NRF_QDEC_Type *p_reg, uint32_t time_us) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_ledpre_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_qdec_ledpol_set (NRF_QDEC_Type *p_reg, nrf_qdec_ledpol_t pol) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_ledpol_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_qdec_reportper_set (NRF_QDEC_Type *p_reg, nrf_qdec_reportper_t reportper) |
| NRFY_STATIC_INLINE nrf_qdec_reportper_t | nrfy_qdec_reportper_get (NRF_QDEC_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_qdec_reportper_to_value (nrf_qdec_reportper_t reportper) |
Hardware access layer with cache and barrier support for managing the QDEC peripheral.
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_a_pin_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE int32_t nrfy_qdec_acc_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_accdbl_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_accdblread_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE int32_t nrfy_qdec_accread_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_accumulators_read | ( | NRF_QDEC_Type const * | p_reg, |
| int32_t * | p_acc, | ||
| uint32_t * | p_accdbl ) |
Function for reading QDEC accumulators.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_acc | Pointer to store the accumulated transitions |
| [in] | p_accdbl | Pointer to store the accumulated double transitions. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_b_pin_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_dbfen_disable | ( | NRF_QDEC_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_dbfen_enable | ( | NRF_QDEC_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_dbfen_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRF_QDEC_DBFEN_DISABLE | The debouncing filter is disabled. |
| NRF_QDEC_DBFEN_ENABLE | The debouncing filter is enabled. |
| NRFY_STATIC_INLINE void nrfy_qdec_disable | ( | NRF_QDEC_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_enable | ( | NRF_QDEC_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_enable_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_event_address_get | ( | NRF_QDEC_Type const * | p_reg, |
| nrf_qdec_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | QDEC event to get its address. |
| NRFY_STATIC_INLINE bool nrfy_qdec_event_check | ( | NRF_QDEC_Type const * | p_reg, |
| nrf_qdec_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | QDEC event to be checked. |
| NRFY_STATIC_INLINE void nrfy_qdec_event_clear | ( | NRF_QDEC_Type * | p_reg, |
| nrf_qdec_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | QDEC event to be cleared. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_events_process | ( | NRF_QDEC_Type * | p_reg, |
| uint32_t | mask ) |
Function for processing the specified QDEC events.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK(). |
| NRFY_STATIC_INLINE void nrfy_qdec_int_disable | ( | NRF_QDEC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be disabled. Use nrf_qdec_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_qdec_int_enable | ( | NRF_QDEC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be enabled. Use nrf_qdec_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_int_enable_check | ( | NRF_QDEC_Type const * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be checked. Use nrf_qdec_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_qdec_int_init | ( | NRF_QDEC_Type * | p_reg, |
| uint32_t | mask, | ||
| uint8_t | irq_priority, | ||
| bool | enable ) |
Function for initializing the specified QDEC interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of interrupts to be initialized. |
| [in] | irq_priority | Interrupt priority. |
| [in] | enable | True if the interrupts are to be enabled, false otherwise. |
| NRFY_STATIC_INLINE void nrfy_qdec_int_uninit | ( | NRF_QDEC_Type * | p_reg | ) |
Function for uninitializing the QDEC interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_led_pin_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_ledpol_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_ledpol_set | ( | NRF_QDEC_Type * | p_reg, |
| nrf_qdec_ledpol_t | pol ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | pol | Level of the active signal of the LED. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_ledpre_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_ledpre_set | ( | NRF_QDEC_Type * | p_reg, |
| uint32_t | time_us ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | time_us | Delay time (in microseconds) between setting LED active state and start sampling. |
| NRFY_STATIC_INLINE void nrfy_qdec_periph_configure | ( | NRF_QDEC_Type * | p_reg, |
| nrfy_qdec_config_t const * | p_config ) |
Function for configuring the QDEC.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_config | Pointer to the peripheral configuration structure. |
| NRFY_STATIC_INLINE void nrfy_qdec_pins_get | ( | NRF_QDEC_Type const * | p_reg, |
| nrfy_qdec_pins_t * | p_pins ) |
Function for reading QDEC pins.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_pins | Pointer to the QDEC pin configurartion structure. |
| NRFY_STATIC_INLINE void nrfy_qdec_pins_set | ( | NRF_QDEC_Type * | p_reg, |
| nrfy_qdec_pins_t const * | p_pins ) |
Function for setting QDEC pins.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_pins | Pointer to the QDEC pin configurartion structure. |
| NRFY_STATIC_INLINE nrf_qdec_reportper_t nrfy_qdec_reportper_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_reportper_set | ( | NRF_QDEC_Type * | p_reg, |
| nrf_qdec_reportper_t | reportper ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | reportper | The number of samples. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_reportper_to_value | ( | nrf_qdec_reportper_t | reportper | ) |
| [in] | reportper | Reportper to be converted to amount of samples per report. |
| NRFY_STATIC_INLINE int32_t nrfy_qdec_sample_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE nrf_qdec_sampleper_t nrfy_qdec_sampleper_get | ( | NRF_QDEC_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_qdec_sampleper_set | ( | NRF_QDEC_Type * | p_reg, |
| nrf_qdec_sampleper_t | sampleper ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | sampleper | The sampling period. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_sampleper_to_value | ( | nrf_qdec_sampleper_t | sampleper | ) |
| [in] | sampleper | The sampling period. |
| NRFY_STATIC_INLINE void nrfy_qdec_shorts_disable | ( | NRF_QDEC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of QDEC shortcuts to be cleared. |
| NRFY_STATIC_INLINE void nrfy_qdec_shorts_enable | ( | NRF_QDEC_Type * | p_reg, |
| uint32_t | mask ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | mask | Mask of QDEC shortcuts to be set. |
| NRFY_STATIC_INLINE uint32_t nrfy_qdec_task_address_get | ( | NRF_QDEC_Type const * | p_reg, |
| nrf_qdec_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | QDEC task to get its address. |
| NRFY_STATIC_INLINE void nrfy_qdec_task_trigger | ( | NRF_QDEC_Type * | p_reg, |
| nrf_qdec_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | QDEC task to be triggered. |