![]() |
nrfx 4.5.0
|
Hardware access layer with cache and barrier support for managing the I2S peripheral. More...
Data Structures | |
| struct | nrfy_i2s_config_t |
| Structure for I2S configuration. More... | |
| struct | nrfy_i2s_xfer_desc_t |
| Structure describing single I2S transfer. More... | |
Functions | |
| NRFY_STATIC_INLINE void | nrfy_i2s_periph_configure (NRF_I2S_Type *p_reg, nrfy_i2s_config_t const *p_config) |
| Function for configuring the I2S. | |
| NRFY_STATIC_INLINE void | nrfy_i2s_int_init (NRF_I2S_Type *p_reg, uint32_t mask, uint8_t irq_priority, bool enable) |
| Function for initializing the specified I2S interrupts. | |
| NRFY_STATIC_INLINE void | nrfy_i2s_int_uninit (NRF_I2S_Type *p_reg) |
| Function for uninitializing the I2S interrupts. | |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_events_process (NRF_I2S_Type *p_reg, uint32_t mask, nrfy_i2s_xfer_desc_t *p_xfer) |
| Function for processing the specified I2S events. | |
| NRFY_STATIC_INLINE void | nrfy_i2s_buffers_set (NRF_I2S_Type *p_reg, nrfy_i2s_xfer_desc_t const *p_xfer) |
| Function for setting the I2S transaction buffers. | |
| NRFY_STATIC_INLINE void | nrfy_i2s_xfer_start (NRF_I2S_Type *p_reg, nrfy_i2s_xfer_desc_t const *p_xfer) |
| Function for starting the I2S transaction. | |
| NRFY_STATIC_INLINE void | nrfy_i2s_abort (NRF_I2S_Type *p_reg, nrfy_i2s_xfer_desc_t const *p_xfer) |
| Function for aborting the ongoing I2S transaction. | |
| NRFY_STATIC_INLINE void | nrfy_i2s_pins_get (NRF_I2S_Type const *p_reg, nrf_i2s_pins_t *p_pins) |
| Function for getting the pins selection. | |
| NRFY_STATIC_INLINE void | nrfy_i2s_task_trigger (NRF_I2S_Type *p_reg, nrf_i2s_task_t task) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_task_address_get (NRF_I2S_Type const *p_reg, nrf_i2s_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_i2s_event_clear (NRF_I2S_Type *p_reg, nrf_i2s_event_t event) |
| NRFY_STATIC_INLINE bool | nrfy_i2s_event_check (NRF_I2S_Type const *p_reg, nrf_i2s_event_t event) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_event_address_get (NRF_I2S_Type const *p_reg, nrf_i2s_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_i2s_int_enable (NRF_I2S_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_i2s_int_disable (NRF_I2S_Type *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_int_enable_check (NRF_I2S_Type const *p_reg, uint32_t mask) |
| NRFY_STATIC_INLINE void | nrfy_i2s_enable (NRF_I2S_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_i2s_disable (NRF_I2S_Type *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_i2s_subscribe_set (NRF_I2S_Type *p_reg, nrf_i2s_task_t task, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_i2s_subscribe_clear (NRF_I2S_Type *p_reg, nrf_i2s_task_t task) |
| NRFY_STATIC_INLINE void | nrfy_i2s_publish_set (NRF_I2S_Type *p_reg, nrf_i2s_event_t event, uint8_t channel) |
| NRFY_STATIC_INLINE void | nrfy_i2s_publish_clear (NRF_I2S_Type *p_reg, nrf_i2s_event_t event) |
| NRFY_STATIC_INLINE void | nrfy_i2s_pins_set (NRF_I2S_Type *p_reg, nrf_i2s_pins_t const *p_pins) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_sck_pin_get (NRF_I2S_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_lrck_pin_get (NRF_I2S_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_mck_pin_get (NRF_I2S_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_sdout_pin_get (NRF_I2S_Type const *p_reg) |
| NRFY_STATIC_INLINE uint32_t | nrfy_i2s_sdin_pin_get (NRF_I2S_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_i2s_configure (NRF_I2S_Type *p_reg, nrf_i2s_config_t const *p_config) |
| NRFY_STATIC_INLINE void | nrfy_i2s_transfer_set (NRF_I2S_Type *p_reg, uint16_t size, uint32_t *p_rx_buffer, uint32_t const *p_tx_buffer) |
| NRFY_STATIC_INLINE void | nrfy_i2s_rx_buffer_set (NRF_I2S_Type *p_reg, uint32_t *p_buffer) |
| NRFY_STATIC_INLINE uint32_t * | nrfy_i2s_rx_buffer_get (NRF_I2S_Type const *p_reg) |
| NRFY_STATIC_INLINE void | nrfy_i2s_tx_buffer_set (NRF_I2S_Type *p_reg, uint32_t const *p_buffer) |
| NRFY_STATIC_INLINE uint32_t * | nrfy_i2s_tx_buffer_get (NRF_I2S_Type const *p_reg) |
Hardware access layer with cache and barrier support for managing the I2S peripheral.
| NRFY_STATIC_INLINE void nrfy_i2s_abort | ( | NRF_I2S_Type * | p_reg, |
| nrfy_i2s_xfer_desc_t const * | p_xfer ) |
Function for aborting the ongoing I2S transaction.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing transaction buffers if the abort is to be blocking. NULL for non-blocking operation. |
| NRFY_STATIC_INLINE void nrfy_i2s_buffers_set | ( | NRF_I2S_Type * | p_reg, |
| nrfy_i2s_xfer_desc_t const * | p_xfer ) |
Function for setting the I2S transaction buffers.
If the transfer in a given direction is not required, pass NULL instead of the pointer to the corresponding buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing transaction buffers. |
| NRFY_STATIC_INLINE void nrfy_i2s_configure | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_config_t const * | p_config ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_config | Pointer to the structure with configuration. |
| NRFY_STATIC_INLINE void nrfy_i2s_disable | ( | NRF_I2S_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_i2s_enable | ( | NRF_I2S_Type * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_event_address_get | ( | NRF_I2S_Type const * | p_reg, |
| nrf_i2s_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Specified event. |
| NRFY_STATIC_INLINE bool nrfy_i2s_event_check | ( | NRF_I2S_Type const * | p_reg, |
| nrf_i2s_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to be checked. |
| true | The event has been generated. |
| false | The event has not been generated. |
| NRFY_STATIC_INLINE void nrfy_i2s_event_clear | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event to clear. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_events_process | ( | NRF_I2S_Type * | p_reg, |
| uint32_t | mask, | ||
| nrfy_i2s_xfer_desc_t * | p_xfer ) |
Function for processing the specified I2S 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(). |
| [in] | p_xfer | Pointer to the structure containing buffers associated with the last transaction. Can be NULL. |
| NRFY_STATIC_INLINE void nrfy_i2s_int_disable | ( | NRF_I2S_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_i2s_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_i2s_int_enable | ( | NRF_I2S_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_i2s_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_int_enable_check | ( | NRF_I2S_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_i2s_int_mask_t values for bit masking. |
| NRFY_STATIC_INLINE void nrfy_i2s_int_init | ( | NRF_I2S_Type * | p_reg, |
| uint32_t | mask, | ||
| uint8_t | irq_priority, | ||
| bool | enable ) |
Function for initializing the specified I2S 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 interrupts are to be enabled, false otherwise. |
| NRFY_STATIC_INLINE void nrfy_i2s_int_uninit | ( | NRF_I2S_Type * | p_reg | ) |
Function for uninitializing the I2S interrupts.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_lrck_pin_get | ( | NRF_I2S_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_mck_pin_get | ( | NRF_I2S_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_i2s_periph_configure | ( | NRF_I2S_Type * | p_reg, |
| nrfy_i2s_config_t const * | p_config ) |
Function for configuring the I2S.
| [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_i2s_pins_get | ( | NRF_I2S_Type const * | p_reg, |
| nrf_i2s_pins_t * | p_pins ) |
Function for getting the pins selection.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_pins | Pointer to the I2S pin configuration structure. |
| NRFY_STATIC_INLINE void nrfy_i2s_pins_set | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_pins_t const * | p_pins ) |
Usage of the SDOUT, SDIN, and MCK signals is optional. If a given signal is not needed, pass the NRF_I2S_PIN_NOT_CONNECTED value instead of its pin number.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_pins | Pointer to the structure with pins selection. |
| NRFY_STATIC_INLINE void nrfy_i2s_publish_clear | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_event_t | event ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to clear the configuration. |
| NRFY_STATIC_INLINE void nrfy_i2s_publish_set | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_event_t | event, | ||
| uint8_t | channel ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | event | Event for which to set the configuration. |
| [in] | channel | Channel through which to publish the event. |
| NRFY_STATIC_INLINE uint32_t * nrfy_i2s_rx_buffer_get | ( | NRF_I2S_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_i2s_rx_buffer_set | ( | NRF_I2S_Type * | p_reg, |
| uint32_t * | p_buffer ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the receive buffer. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_sck_pin_get | ( | NRF_I2S_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdin_pin_get | ( | NRF_I2S_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdout_pin_get | ( | NRF_I2S_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_i2s_subscribe_clear | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to clear the configuration. |
| NRFY_STATIC_INLINE void nrfy_i2s_subscribe_set | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_task_t | task, | ||
| uint8_t | channel ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task for which to set the configuration. |
| [in] | channel | Channel through which to subscribe events. |
| NRFY_STATIC_INLINE uint32_t nrfy_i2s_task_address_get | ( | NRF_I2S_Type const * | p_reg, |
| nrf_i2s_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Specified task. |
| NRFY_STATIC_INLINE void nrfy_i2s_task_trigger | ( | NRF_I2S_Type * | p_reg, |
| nrf_i2s_task_t | task ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | task | Task to be activated. |
| NRFY_STATIC_INLINE void nrfy_i2s_transfer_set | ( | NRF_I2S_Type * | p_reg, |
| uint16_t | size, | ||
| uint32_t * | p_rx_buffer, | ||
| uint32_t const * | p_tx_buffer ) |
This function sets up the RX and TX buffers and enables reception or transmission (or both) accordingly. If the transfer in a given direction is not required, pass NULL instead of the pointer to the corresponding buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | size | Size of the buffers (in 32-bit words). |
| [in] | p_rx_buffer | Pointer to the receive buffer. Pass NULL to disable reception. |
| [in] | p_tx_buffer | Pointer to the transmit buffer. Pass NULL to disable transmission. |
| NRFY_STATIC_INLINE uint32_t * nrfy_i2s_tx_buffer_get | ( | NRF_I2S_Type const * | p_reg | ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| NRFY_STATIC_INLINE void nrfy_i2s_tx_buffer_set | ( | NRF_I2S_Type * | p_reg, |
| uint32_t const * | p_buffer ) |
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_buffer | Pointer to the transmit buffer. |
| NRFY_STATIC_INLINE void nrfy_i2s_xfer_start | ( | NRF_I2S_Type * | p_reg, |
| nrfy_i2s_xfer_desc_t const * | p_xfer ) |
Function for starting the I2S transaction.
If the transfer in a given direction is not required, pass NULL instead of the pointer to the corresponding buffer.
| [in] | p_reg | Pointer to the structure of registers of the peripheral. |
| [in] | p_xfer | Pointer to the structure containing transaction buffers if the transaction is to be blocking. NULL for non-blocking transactions. |