gossamer 0.0.1
a very lightweight app framework for SAMD and SAML chips
Loading...
Searching...
No Matches
Inter-IC Sound interface

Functions for configuring and using the I2S peripheral (SAM D21 only). More...

Enumerations

enum  i2s_mode_t { I2S_MODE_NORMAL , I2S_MODE_RIGHT_JUSTIFIED , I2S_MODE_LEFT_JUSTIFIED }
 

Functions

void i2s_init (uint8_t instance, uint16_t sampleRate, uint8_t bitsPerSample, i2s_mode_t mode)
 Initializes the I2S peripheral.
 
void i2s_enable_receiver (uint8_t instance)
 

Detailed Description

Functions for configuring and using the I2S peripheral (SAM D21 only).

Function Documentation

◆ i2s_init()

void i2s_init ( uint8_t  instance,
uint16_t  sampleRate,
uint8_t  bitsPerSample,
i2s_mode_t  mode 
)

Initializes the I2S peripheral.

Parameters
instanceThe I2S peripheral instance to initialize.
sampleRateThe sample rate to use.
bitsPerSampleThe number of bits per sample.
modeThe I2S mode to use.
See also
i2s_mode_t
Note
This function only initializes the I2S peripheral. You must configure the pins yourself.