FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gap8/pmsis/drivers/udma/i2s/i2s_internal.c File Reference

Functions

static void __pi_i2s_handler (void *arg)
 
static void __pi_i2s_resume (struct i2s_itf_data_s *itf_data)
 
static void __pi_i2s_suspend (struct i2s_itf_data_s *itf_data)
 
static uint8_t __pi_i2s_enqueue (struct i2s_itf_data_s *itf_data)
 
static void * __pi_i2s_pop (struct i2s_itf_data_s *itf_data)
 
static int32_t __pi_i2s_conf_apply (struct i2s_itf_data_s *itf_data)
 
static int32_t __pi_i2s_conf_set (struct i2s_itf_data_s *itf_data, struct pi_i2s_conf *conf)
 
static void __pi_i2s_conf_get (struct i2s_itf_data_s *itf_data, struct pi_i2s_conf *conf)
 
static void __pi_i2s_clock_enable (struct i2s_itf_data_s *itf_data)
 
static void __pi_i2s_clock_disable (struct i2s_itf_data_s *itf_data)
 
static uint32_t __pi_i2s_clk_div (uint32_t i2s_freq)
 
void __pi_i2s_conf_init (struct pi_i2s_conf *conf)
 Init i2s configuration structure. More...
 
int32_t __pi_i2s_open (struct pi_i2s_conf *conf, struct i2s_itf_data_s **device_data)
 Open i2s device. More...
 
void __pi_i2s_close (struct i2s_itf_data_s *itf_data)
 Close i2s device. More...
 
int32_t __pi_i2s_ioctl (struct i2s_itf_data_s *itf_data, uint32_t cmd, void *arg)
 Ioctl function. More...
 
int32_t __pi_i2s_read_async (struct i2s_itf_data_s *itf_data, pi_task_t *task)
 Load data from micro. More...
 
int32_t __pi_i2s_read_status (pi_task_t *task, void **mem_block, size_t *size)
 Return status. More...
 
void __pi_i2s_setup (uint32_t flags)
 Setup misc flags. More...
 

Variables

static uint32_t g_i2s_flags
 
struct i2s_itf_data_sg_i2s_itf_data [UDMA_NB_I2S<< 1]
 

Function Documentation

static uint32_t __pi_i2s_clk_div ( uint32_t  i2s_freq)
inlinestatic
static void __pi_i2s_clock_disable ( struct i2s_itf_data_s itf_data)
static
void __pi_i2s_close ( struct i2s_itf_data_s itf_data)
Parameters
i2s_idID of i2s interface.

Referenced by pi_i2s_close().

void __pi_i2s_conf_init ( struct pi_i2s_conf *  conf)
Parameters
confPointer to i2s conf.

Referenced by __pi_i2s_open(), and pi_i2s_conf_init().

int32_t __pi_i2s_ioctl ( struct i2s_itf_data_s itf_data,
uint32_t  cmd,
void *  arg 
)
Parameters
i2s_idID of i2s interface.
cmdIoctl command.
argIoctl argument.
Return values
-1Uknown command.
ValueIoctl command return value.

Referenced by pi_i2s_ioctl().

int32_t __pi_i2s_open ( struct pi_i2s_conf *  conf,
struct i2s_itf_data_s **  device_data 
)
Parameters
confPointer to i2s conf.
device_dataPointer to device data.
Return values
0Operation is successful.
ERRNOError code.

Referenced by pi_i2s_open().

static void * __pi_i2s_pop ( struct i2s_itf_data_s itf_data)
static
int32_t __pi_i2s_read_status ( pi_task_t task,
void **  mem_block,
size_t *  size 
)
Parameters
taskPointer to struct pi_task.
mem_blockPointer to data buffer.
sizePointer to size.

Referenced by pi_i2s_read_status().

void __pi_i2s_setup ( uint32_t  flags)
Parameters
flagsFlags to set.

References g_i2s_flags.

Referenced by pi_i2s_setup().

Variable Documentation

uint32_t g_i2s_flags
static
struct i2s_itf_data_s* g_i2s_itf_data[UDMA_NB_I2S<< 1]