I2S Slave Initialization API

The following structures and functions are used to initialize and start an I2S slave driver instance.

void rtos_i2s_slave_init(rtos_i2s_t *i2s_ctx, uint32_t io_core_mask, port_t p_dout[], size_t num_out, port_t p_din[], size_t num_in, port_t p_bclk, port_t p_lrclk, xclock_t bclk)

Initializes an RTOS I2S driver instance in slave mode. This must only be called by the tile that owns the driver instance. It should be called before starting the RTOS, and must be called before calling rtos_i2s_start() or any of the core I2S driver functions with this instance.

Parameters
  • i2s_ctx – A pointer to the I2S driver instance to initialize.

  • io_core_mask – A bitmask representing the cores on which the low level I2S I/O thread created by the driver is allowed to run. Bit 0 is core 0, bit 1 is core 1, etc.

  • p_dout – An array of data output ports.

  • num_out – The number of output data ports.

  • p_din – An array of data input ports.

  • num_in – The number of input data ports.

  • p_bclk – The bit clock input port.

  • p_lrclk – The word clock input port.

  • bclk – A clock that will get configured for use with the bit clock.