MAX32655 Peripheral Driver API
Peripheral Driver API for the MAX32655
Inter-Integrated Sound (I2S)

Modules

 I2S_Registers
 

Data Structures

struct  mxc_i2s_req_t
 

Enumerations

enum  mxc_i2s_stereo_t
 
enum  mxc_i2s_polarity_t
 
enum  mxc_i2s_bitorder_t
 
enum  mxc_i2s_justify_t
 
enum  mxc_i2s_wsize_t
 
enum  mxc_i2s_samplesize_t
 
enum  mxc_i2s_ch_mode_t
 

Functions

int MXC_I2S_Init (mxc_i2s_req_t *req)
 
int MXC_I2S_Shutdown (void)
 
int MXC_I2S_ConfigData (mxc_i2s_req_t *req)
 
void MXC_I2S_TXEnable (void)
 
void MXC_I2S_TXDisable (void)
 
void MXC_I2S_RXEnable (void)
 
void MXC_I2S_RXDisable (void)
 
int MXC_I2S_SetRXThreshold (uint8_t threshold)
 
int MXC_I2S_SetFrequency (mxc_i2s_ch_mode_t mode, uint16_t clkdiv)
 
void MXC_I2S_Flush (void)
 
void MXC_I2S_EnableInt (uint32_t flags)
 
void MXC_I2S_DisableInt (uint32_t flags)
 
int MXC_I2S_GetFlags (void)
 
void MXC_I2S_ClearFlags (uint32_t flags)
 
void MXC_I2S_TXDMAConfig (void *src_addr, int len)
 
void MXC_I2S_RXDMAConfig (void *dest_addr, int len)
 

Detailed Description


Data Structure Documentation

◆ mxc_i2s_req_t

struct mxc_i2s_req_t

I2S Configuration Struct.

Function Documentation

◆ MXC_I2S_ClearFlags()

void MXC_I2S_ClearFlags ( uint32_t  flags)

Clears Interrupt Flags.

Parameters
flagsInterrupt flags to be cleared

◆ MXC_I2S_ConfigData()

int MXC_I2S_ConfigData ( mxc_i2s_req_t req)

Configure data to be transmitted based on word and sample size.

Parameters
reqsee mxc_i2s_req_t I2S Request Struct
Returns
Success/Fail, see Error Codes for a list of return codes.

◆ MXC_I2S_DisableInt()

void MXC_I2S_DisableInt ( uint32_t  flags)

Disable Interrupt.

Parameters
flagsInterrupt mask

◆ MXC_I2S_EnableInt()

void MXC_I2S_EnableInt ( uint32_t  flags)

Enable Interrupts.

Parameters
flagsInterrupt mask

◆ MXC_I2S_GetFlags()

int MXC_I2S_GetFlags ( void  )

Get the set interrupt flags.

Returns
int return the mask of the set interrupt flags

◆ MXC_I2S_Init()

int MXC_I2S_Init ( mxc_i2s_req_t req)

Initialize I2S resources.

Parameters
reqsee mxc_i2s_req_t I2S Request Struct
Returns
Success/Fail, see Error Codes for a list of return codes.

◆ MXC_I2S_RXDMAConfig()

void MXC_I2S_RXDMAConfig ( void *  dest_addr,
int  len 
)

Configure RX DMA transaction.

Parameters
dest_addrdestination address
lenlength of the data to be received

◆ MXC_I2S_SetFrequency()

int MXC_I2S_SetFrequency ( mxc_i2s_ch_mode_t  mode,
uint16_t  clkdiv 
)

Set I2S Frequency, automatically called by I2S_Init.

Parameters
modeChannel mode to select clock
clkdivclock divider to set baudrate
Returns
Success/Fail, see Error Codes for a list of return codes.

◆ MXC_I2S_SetRXThreshold()

int MXC_I2S_SetRXThreshold ( uint8_t  threshold)

Set threshold for RX FIFO.

Parameters
threshold
Returns
Success/Fail, see Error Codes for a list of return codes.

◆ MXC_I2S_Shutdown()

int MXC_I2S_Shutdown ( void  )

Release I2S, clear configuration and flush FIFOs.

Returns
Success/Fail, see Error Codes for a list of return codes.

◆ MXC_I2S_TXDMAConfig()

void MXC_I2S_TXDMAConfig ( void *  src_addr,
int  len 
)

Configure TX DMA transaction.

Parameters
src_addrsource address of data
lenlength od the data to be transmitted