HPM SDK
HPMicro Software Development Kit
I2S common driver APIs

I2S common driver APIs. More...

Macros

#define I2S_PROTOCOL_I2S_PHILIPS   (0U)
 
#define I2S_PROTOCOL_MSB_JUSTIFIED   (1U)
 
#define I2S_PROTOCOL_LEFT_JUSTIFIED   (1U)
 
#define I2S_PROTOCOL_LSB_JUSTIFIED   (2U)
 
#define I2S_PROTOCOL_RIGHT_JUSTIFIED   (2U)
 
#define I2S_PROTOCOL_PCM   (3U)
 
#define I2S_CHANNEL_SLOT_MASK(x)   (1U << (x))
 
#define I2S_CFGR_DATASIZ(x)   ((x - 16) >> 3)
 
#define I2S_CFGR_CHSIZ(x)   ((x - 16) >> 4)
 

Enumerations

enum  { i2s_audio_depth_16_bits = 16 , i2s_audio_depth_24_bits = 24 , i2s_audio_depth_32_bits = 32 }
 I2S audio depth. More...
 
enum  { i2s_channel_length_16_bits = 16 , i2s_channel_length_32_bits = 32 }
 I2S channel length. More...
 
enum  { i2s_mono_left = 0 , i2s_mono_right = 1 , i2s_stereo = 2 }
 I2S stereo/mono channel. More...
 

Detailed Description

I2S common driver APIs.

Macro Definition Documentation

◆ I2S_CFGR_CHSIZ

#define I2S_CFGR_CHSIZ (   x)    ((x - 16) >> 4)

◆ I2S_CFGR_DATASIZ

#define I2S_CFGR_DATASIZ (   x)    ((x - 16) >> 3)

◆ I2S_CHANNEL_SLOT_MASK

#define I2S_CHANNEL_SLOT_MASK (   x)    (1U << (x))

◆ I2S_PROTOCOL_I2S_PHILIPS

#define I2S_PROTOCOL_I2S_PHILIPS   (0U)

◆ I2S_PROTOCOL_LEFT_JUSTIFIED

#define I2S_PROTOCOL_LEFT_JUSTIFIED   (1U)

◆ I2S_PROTOCOL_LSB_JUSTIFIED

#define I2S_PROTOCOL_LSB_JUSTIFIED   (2U)

◆ I2S_PROTOCOL_MSB_JUSTIFIED

#define I2S_PROTOCOL_MSB_JUSTIFIED   (1U)

◆ I2S_PROTOCOL_PCM

#define I2S_PROTOCOL_PCM   (3U)

◆ I2S_PROTOCOL_RIGHT_JUSTIFIED

#define I2S_PROTOCOL_RIGHT_JUSTIFIED   (2U)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include <drivers/inc/hpm_i2s_common.h>

I2S audio depth.

Enumerator
i2s_audio_depth_16_bits 
i2s_audio_depth_24_bits 
i2s_audio_depth_32_bits 

◆ anonymous enum

anonymous enum

#include <drivers/inc/hpm_i2s_common.h>

I2S channel length.

Enumerator
i2s_channel_length_16_bits 
i2s_channel_length_32_bits 

◆ anonymous enum

anonymous enum

#include <drivers/inc/hpm_i2s_common.h>

I2S stereo/mono channel.

Enumerator
i2s_mono_left 
i2s_mono_right 
i2s_stereo