<alp/i2s.h> — I²S / SAI
Raw I²S / SAI bus access. For higher-level audio capture and playback, use <alp/audio.h>.
Header
#include <alp/i2s.h>
Quick example
alp_i2s_t *i2s = alp_i2s_open(&(alp_i2s_config_t){
.bus_id = E1M_I2S0,
.mode = ALP_I2S_MODE_MASTER,
.sample_rate_hz= 44100,
.channels = 2,
.bit_depth = 16,
.direction = ALP_I2S_DIR_TX,
});
alp_i2s_write(i2s, pcm_buffer, frame_count);
alp_i2s_close(i2s);
See also
<alp/audio.h>— high-level audio- Examples: i2s-tone
Questions about this page? Discuss in Community Forum