nrfx 3.3
Data Structures | Functions
I2S HALY

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_buffers_t
 I2S driver buffers structure. 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)
 

Detailed Description

Hardware access layer with cache and barrier support for managing the I2S peripheral.

Function Documentation

◆ nrfy_i2s_abort()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_xferPointer to the structure containing transaction buffers if the abort is to be blocking. NULL for non-blocking operation.

◆ nrfy_i2s_buffers_set()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_xferPointer to the structure containing transaction buffers.

◆ nrfy_i2s_configure()

NRFY_STATIC_INLINE void nrfy_i2s_configure ( NRF_I2S_Type *  p_reg,
nrf_i2s_config_t const *  p_config 
)
See also
nrf_i2s_configure Function for setting the I2S peripheral configuration.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the structure with configuration.

◆ nrfy_i2s_disable()

NRFY_STATIC_INLINE void nrfy_i2s_disable ( NRF_I2S_Type *  p_reg)
See also
nrf_i2s_disable Function for disabling the I2S peripheral.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_i2s_enable()

NRFY_STATIC_INLINE void nrfy_i2s_enable ( NRF_I2S_Type *  p_reg)
See also
nrf_i2s_enable Function for enabling the I2S peripheral.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_i2s_event_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_event_address_get ( NRF_I2S_Type const *  p_reg,
nrf_i2s_event_t  event 
)
See also
nrf_i2s_event_address_get Function for getting the address of the specified I2S event register.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventSpecified event.
Returns
Address of the specified event register.

◆ nrfy_i2s_event_check()

NRFY_STATIC_INLINE bool nrfy_i2s_event_check ( NRF_I2S_Type const *  p_reg,
nrf_i2s_event_t  event 
)
See also
nrf_i2s_event_check Function for retrieving the state of the I2S event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to be checked.
Return values
trueThe event has been generated.
falseThe event has not been generated.

◆ nrfy_i2s_event_clear()

NRFY_STATIC_INLINE void nrfy_i2s_event_clear ( NRF_I2S_Type *  p_reg,
nrf_i2s_event_t  event 
)
See also
nrf_i2s_event_clear Function for clearing the specified I2S event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent to clear.

◆ nrfy_i2s_events_process()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of events to be processed, created by NRFY_EVENT_TO_INT_BITMASK().
[in]p_xferPointer 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_i2s_int_disable()

NRFY_STATIC_INLINE void nrfy_i2s_int_disable ( NRF_I2S_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_i2s_int_disable Function for disabling specified interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be disabled. Use nrf_i2s_int_mask_t values for bit masking.

◆ nrfy_i2s_int_enable()

NRFY_STATIC_INLINE void nrfy_i2s_int_enable ( NRF_I2S_Type *  p_reg,
uint32_t  mask 
)
See also
nrf_i2s_int_enable Function for enabling specified interrupts.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be enabled. Use nrf_i2s_int_mask_t values for bit masking.

◆ nrfy_i2s_int_enable_check()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_int_enable_check ( NRF_I2S_Type const *  p_reg,
uint32_t  mask 
)
See also
nrf_i2s_int_enable_check Function for checking if the specified interrupts are enabled.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be checked. Use nrf_i2s_int_mask_t values for bit masking.
Returns
Mask of enabled interrupts.

◆ nrfy_i2s_int_init()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]maskMask of interrupts to be initialized.
[in]irq_priorityInterrupt priority.
[in]enableTrue if interrupts are to be enabled, false otherwise.

◆ nrfy_i2s_int_uninit()

NRFY_STATIC_INLINE void nrfy_i2s_int_uninit ( NRF_I2S_Type *  p_reg)

Function for uninitializing the I2S interrupts.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.

◆ nrfy_i2s_lrck_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_lrck_pin_get ( NRF_I2S_Type const *  p_reg)
See also
nrf_i2s_lrck_pin_get Function for getting the LRCK pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
LRCK pin selection.

◆ nrfy_i2s_mck_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_mck_pin_get ( NRF_I2S_Type const *  p_reg)
See also
nrf_i2s_mck_pin_get Function for getting the MCK pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
MCK pin selection.

◆ nrfy_i2s_periph_configure()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_configPointer to the peripheral configuration structure.

◆ nrfy_i2s_pins_get()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_pinsPointer to the I2S pin configuration structure.

◆ nrfy_i2s_pins_set()

NRFY_STATIC_INLINE void nrfy_i2s_pins_set ( NRF_I2S_Type *  p_reg,
nrf_i2s_pins_t const *  p_pins 
)
See also
nrf_i2s_pins_set Function for configuring I2S 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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_pinsPointer to the structure with pins selection.

◆ nrfy_i2s_publish_clear()

NRFY_STATIC_INLINE void nrfy_i2s_publish_clear ( NRF_I2S_Type *  p_reg,
nrf_i2s_event_t  event 
)
See also
nrf_i2s_publish_clear Function for clearing the publish configuration for a given I2S event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to clear the configuration.

◆ nrfy_i2s_publish_set()

NRFY_STATIC_INLINE void nrfy_i2s_publish_set ( NRF_I2S_Type *  p_reg,
nrf_i2s_event_t  event,
uint8_t  channel 
)
See also
nrf_i2s_publish_set Function for setting the publish configuration for a given I2S event.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]eventEvent for which to set the configuration.
[in]channelChannel through which to publish the event.

◆ nrfy_i2s_rx_buffer_get()

NRFY_STATIC_INLINE uint32_t * nrfy_i2s_rx_buffer_get ( NRF_I2S_Type const *  p_reg)
See also
nrf_i2s_rx_buffer_get Function for getting the pointer to the receive buffer.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to the receive buffer.

◆ nrfy_i2s_rx_buffer_set()

NRFY_STATIC_INLINE void nrfy_i2s_rx_buffer_set ( NRF_I2S_Type *  p_reg,
uint32_t *  p_buffer 
)
See also
nrf_i2s_rx_buffer_set Function for setting the pointer to the receive buffer.
Note
The size of the buffer can be set only by calling nrf_i2s_transfer_set.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the receive buffer.

◆ nrfy_i2s_sck_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_sck_pin_get ( NRF_I2S_Type const *  p_reg)
See also
nrf_i2s_sck_pin_get Function for getting the SCK pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
SCK pin selection.

◆ nrfy_i2s_sdin_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdin_pin_get ( NRF_I2S_Type const *  p_reg)
See also
nrf_i2s_sdin_pin_get Function for getting the SDIN pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
SDIN pin selection.

◆ nrfy_i2s_sdout_pin_get()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_sdout_pin_get ( NRF_I2S_Type const *  p_reg)
See also
nrf_i2s_sdout_pin_get Function for getting the SDOUT pin selection.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
SDOUT pin selection.

◆ nrfy_i2s_subscribe_clear()

NRFY_STATIC_INLINE void nrfy_i2s_subscribe_clear ( NRF_I2S_Type *  p_reg,
nrf_i2s_task_t  task 
)
See also
nrf_i2s_subscribe_clear Function for clearing the subscribe configuration for a given I2S task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to clear the configuration.

◆ nrfy_i2s_subscribe_set()

NRFY_STATIC_INLINE void nrfy_i2s_subscribe_set ( NRF_I2S_Type *  p_reg,
nrf_i2s_task_t  task,
uint8_t  channel 
)
See also
nrf_i2s_subscribe_set Function for setting the subscribe configuration for a given I2S task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask for which to set the configuration.
[in]channelChannel through which to subscribe events.

◆ nrfy_i2s_task_address_get()

NRFY_STATIC_INLINE uint32_t nrfy_i2s_task_address_get ( NRF_I2S_Type const *  p_reg,
nrf_i2s_task_t  task 
)
See also
nrf_i2s_task_address_get Function for getting the address of the specified I2S task register.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskSpecified task.
Returns
Address of the specified task register.

◆ nrfy_i2s_task_trigger()

NRFY_STATIC_INLINE void nrfy_i2s_task_trigger ( NRF_I2S_Type *  p_reg,
nrf_i2s_task_t  task 
)
See also
nrf_i2s_task_trigger Function for activating the specified I2S task.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]taskTask to be activated.

◆ nrfy_i2s_transfer_set()

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 
)
See also
nrf_i2s_transfer_set Function for setting up the I2S transfer.

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.

Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]sizeSize of the buffers (in 32-bit words).
[in]p_rx_bufferPointer to the receive buffer. Pass NULL to disable reception.
[in]p_tx_bufferPointer to the transmit buffer. Pass NULL to disable transmission.

◆ nrfy_i2s_tx_buffer_get()

NRFY_STATIC_INLINE uint32_t * nrfy_i2s_tx_buffer_get ( NRF_I2S_Type const *  p_reg)
See also
nrf_i2s_tx_buffer_get Function for getting the pointer to the transmit buffer.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
Returns
Pointer to the transmit buffer.

◆ nrfy_i2s_tx_buffer_set()

NRFY_STATIC_INLINE void nrfy_i2s_tx_buffer_set ( NRF_I2S_Type *  p_reg,
uint32_t const *  p_buffer 
)
See also
nrf_i2s_tx_buffer_set Function for setting the pointer to the transmit buffer.
Note
The size of the buffer can be set only by calling nrf_i2s_transfer_set.
Parameters
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_bufferPointer to the transmit buffer.

◆ nrfy_i2s_xfer_start()

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
[in]p_regPointer to the structure of registers of the peripheral.
[in]p_xferPointer to the structure containing transaction buffers if the transaction is to be blocking. NULL for non-blocking transactions.

Documentation feedback | Developer Zone | Subscribe | Updated