I2S HALY
- group nrfy_i2s
Hardware access layer with cache and barrier support for managing the I2S peripheral.
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_config – [in] Pointer to the peripheral configuration structure.
-
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of interrupts to be initialized.
irq_priority – [in] Interrupt priority.
enable – [in] 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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
-
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
mask – [in] Mask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK().
p_xfer – [in] Pointer to the structure containing buffers associated with the last transaction. Can be NULL.
- Returns:
Mask of events that were generated and processed. To be checked against the result of NRFY_EVENT_TO_INT_BITMASK().
-
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_xfer – [in] Pointer to the structure containing 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.
If the transfer in a given direction is not required, pass NULL instead of the pointer to the corresponding buffer.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_xfer – [in] Pointer to the structure containing transaction buffers if the transaction is to be blocking. NULL for non-blocking transactions.
-
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.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_xfer – [in] 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_pins_get(NRF_I2S_Type const *p_reg, nrf_i2s_pins_t *p_pins)
Function for getting the pins selection.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
p_pins – [in] Pointer to the I2S pin configuration structure.
-
NRFY_STATIC_INLINE void nrfy_i2s_task_trigger(NRF_I2S_Type *p_reg, nrf_i2s_task_t task)
@refhal{nrf_i2s_task_trigger}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_task_address_get(NRF_I2S_Type const *p_reg, nrf_i2s_task_t task)
@refhal{nrf_i2s_task_address_get}
-
NRFY_STATIC_INLINE void nrfy_i2s_event_clear(NRF_I2S_Type *p_reg, nrf_i2s_event_t event)
@refhal{nrf_i2s_event_clear}
-
NRFY_STATIC_INLINE bool nrfy_i2s_event_check(NRF_I2S_Type const *p_reg, nrf_i2s_event_t event)
@refhal{nrf_i2s_event_check}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_event_address_get(NRF_I2S_Type const *p_reg, nrf_i2s_event_t event)
@refhal{nrf_i2s_event_address_get}
-
NRFY_STATIC_INLINE void nrfy_i2s_int_enable(NRF_I2S_Type *p_reg, uint32_t mask)
@refhal{nrf_i2s_int_enable}
-
NRFY_STATIC_INLINE void nrfy_i2s_int_disable(NRF_I2S_Type *p_reg, uint32_t mask)
@refhal{nrf_i2s_int_disable}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_int_enable_check(NRF_I2S_Type const *p_reg, uint32_t mask)
@refhal{nrf_i2s_int_enable_check}
-
NRFY_STATIC_INLINE void nrfy_i2s_enable(NRF_I2S_Type *p_reg)
@refhal{nrf_i2s_enable}
-
NRFY_STATIC_INLINE void nrfy_i2s_disable(NRF_I2S_Type *p_reg)
@refhal{nrf_i2s_disable}
-
NRFY_STATIC_INLINE void nrfy_i2s_subscribe_set(NRF_I2S_Type *p_reg, nrf_i2s_task_t task, uint8_t channel)
@refhal{nrf_i2s_subscribe_set}
-
NRFY_STATIC_INLINE void nrfy_i2s_subscribe_clear(NRF_I2S_Type *p_reg, nrf_i2s_task_t task)
@refhal{nrf_i2s_subscribe_clear}
-
NRFY_STATIC_INLINE void nrfy_i2s_publish_set(NRF_I2S_Type *p_reg, nrf_i2s_event_t event, uint8_t channel)
@refhal{nrf_i2s_publish_set}
-
NRFY_STATIC_INLINE void nrfy_i2s_publish_clear(NRF_I2S_Type *p_reg, nrf_i2s_event_t event)
@refhal{nrf_i2s_publish_clear}
-
NRFY_STATIC_INLINE void nrfy_i2s_pins_set(NRF_I2S_Type *p_reg, nrf_i2s_pins_t const *p_pins)
@refhal{nrf_i2s_pins_set}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_sck_pin_get(NRF_I2S_Type const *p_reg)
@refhal{nrf_i2s_sck_pin_get}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_lrck_pin_get(NRF_I2S_Type const *p_reg)
@refhal{nrf_i2s_lrck_pin_get}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_mck_pin_get(NRF_I2S_Type const *p_reg)
@refhal{nrf_i2s_mck_pin_get}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdout_pin_get(NRF_I2S_Type const *p_reg)
@refhal{nrf_i2s_sdout_pin_get}
-
NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdin_pin_get(NRF_I2S_Type const *p_reg)
@refhal{nrf_i2s_sdin_pin_get}
-
NRFY_STATIC_INLINE void nrfy_i2s_configure(NRF_I2S_Type *p_reg, nrf_i2s_config_t const *p_config)
@refhal{nrf_i2s_configure}
-
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)
@refhal{nrf_i2s_transfer_set}
-
NRFY_STATIC_INLINE void nrfy_i2s_rx_buffer_set(NRF_I2S_Type *p_reg, uint32_t *p_buffer)
@refhal{nrf_i2s_rx_buffer_set}
-
NRFY_STATIC_INLINE uint32_t *nrfy_i2s_rx_buffer_get(NRF_I2S_Type const *p_reg)
@refhal{nrf_i2s_rx_buffer_get}
-
NRFY_STATIC_INLINE void nrfy_i2s_tx_buffer_set(NRF_I2S_Type *p_reg, uint32_t const *p_buffer)
@refhal{nrf_i2s_tx_buffer_set}
-
NRFY_STATIC_INLINE uint32_t *nrfy_i2s_tx_buffer_get(NRF_I2S_Type const *p_reg)
@refhal{nrf_i2s_tx_buffer_get}
-
struct nrfy_i2s_config_t
- #include <nrfy_i2s.h>
Structure for I2S configuration.
Public Members
-
nrf_i2s_config_t config
Peripheral configuration.
-
nrf_i2s_pins_t pins
Pins to be used.
-
bool skip_psel_cfg
Skip pin selection configuration.
When set to true, the driver does not modify pin select registers in the peripheral. Those registers are supposed to be set up externally before the driver is initialized.
Note
When both GPIO configuration and pin selection are to be skipped, the structure fields that specify pins can be omitted, as they are ignored anyway.
-
nrf_i2s_config_t config
-
struct nrfy_i2s_buffers_t
- #include <nrfy_i2s.h>
I2S driver buffers structure.
-
struct nrfy_i2s_xfer_desc_t
- #include <nrfy_i2s.h>
Structure describing single I2S transfer.
Public Members
-
nrfy_i2s_buffers_t const *p_buffers
Pointer to the structure with I2S buffers.
-
uint16_t buffer_size
Size of buffers.
-
nrfy_i2s_buffers_t const *p_buffers
-
NRFY_STATIC_INLINE void nrfy_i2s_periph_configure(NRF_I2S_Type *p_reg, nrfy_i2s_config_t const *p_config)