FreeRTOS port on GAP8/RISC-V
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gap9/pmsis/include/pmsis/implem/hal/udma/udma_i2s.h File Reference

Macros

#define I2S_SLOT_DISABLE
 
#define I2S_SLOT_ENABLE
 
#define I2S_WORD_SIZE_08
 
#define I2S_WORD_SIZE_16
 
#define I2S_WORD_SIZE_24
 
#define I2S_WORD_SIZE_32
 
#define I2S_CLK_DISABLE
 
#define I2S_CLK_ENABLE
 
#define I2S_CLK_SRC_INT
 
#define I2S_CLK_SRC_EXT
 
#define I2S_CLK_EXT_SRC_PAD
 
#define I2S_CLK_EXT_SRC_INT
 
#define I2S_CLK_EDGE_RISE
 
#define I2S_CLK_EDGE_FALL
 
#define I2S_WS_SRC_INT
 
#define I2S_WS_SRC_EXT
 
#define I2S_WS_EXT_SRC_PAD
 
#define I2S_WS_EXT_SRC_INT
 
#define I2S_WS_EDGE_RISE
 
#define I2S_WS_EDGE_FALL
 
#define I2S_WS_TYPE_PULSE
 
#define I2S_WS_TYPE_STATE
 
#define I2S_WS_TYPE_N_2_SLOT
 
#define I2S_WS_TYPE_DONT_CARE
 
#define I2S_GLB_DISABLE
 
#define I2S_GLB_ENABLE
 
#define I2S_GLB_DUPLEX_DIS
 
#define I2S_GLB_DUPLEX_ENA
 
#define I2S_GLB_PDM_DIS
 
#define I2S_GLB_PDM_ENA
 
#define I2S_GLB_PDM_2CH_DIS
 
#define I2S_GLB_PDM_2CH_ENA
 

Functions

static void udma_i2s_slot_cfg_set (uint32_t base, uint8_t slot_num, uint32_t cfg)
 
static uint32_t udma_i2s_slot_cfg_get (uint32_t base, uint8_t slot_num)
 
static void udma_i2s_word_size_set (uint32_t base, uint8_t slot_num, uint32_t word_size)
 
static uint32_t udma_i2s_word_size_get (uint32_t base, uint8_t slot_num)
 
static void hal_udma_i2s_slot_cfg_set (uint32_t device_id, uint8_t slot_num, uint32_t cfg)
 
static uint32_t hal_udma_i2s_slot_cfg_get (uint32_t device_id, uint8_t slot_num)
 
static void hal_udma_i2s_slot_cfg_rx_set (uint32_t device_id, uint8_t slot_num, int8_t udma_chan_id, uint8_t ena, uint8_t msb, uint8_t left_align, uint8_t udma_size, uint8_t sign_ena)
 
static uint32_t hal_udma_i2s_slot_rx_chan_id_get (uint32_t device_id, uint8_t slot_num)
 
static void hal_udma_i2s_slot_cfg_rx_enable (uint32_t device_id, uint8_t slot_num)
 
static void hal_udma_i2s_slot_cfg_rx_disable (uint32_t device_id, uint8_t slot_num)
 
static void hal_udma_i2s_slot_cfg_tx_set (uint32_t device_id, uint8_t slot_num, int8_t udma_chan_id, uint8_t ena, uint8_t msb, uint8_t left_align, uint8_t udma_size, uint8_t sign_ena, uint8_t byp)
 
static uint32_t hal_udma_i2s_slot_tx_chan_id_get (uint32_t device_id, uint8_t slot_num)
 
static void hal_udma_i2s_slot_cfg_tx_enable (uint32_t device_id, uint8_t slot_num)
 
static void hal_udma_i2s_slot_cfg_tx_disable (uint32_t device_id, uint8_t slot_num)
 
static uint32_t hal_udma_i2s_word_size_get (uint32_t device_id, uint8_t slot_num)
 
static void hal_udma_i2s_word_size_rx_set (uint32_t device_id, uint8_t slot_num, uint8_t size)
 
static void hal_udma_i2s_word_size_tx_set (uint32_t device_id, uint8_t slot_num, uint8_t size)
 
static uint32_t hal_udma_i2s_slot_en_get (uint32_t device_id)
 
static void hal_udma_i2s_slot_en_set (uint32_t device_id, uint32_t enable)
 
static uint32_t hal_udma_i2s_clkcfg_reg_get (uint32_t device_id)
 
static void hal_udma_i2s_clkcfg_reg_set (uint32_t device_id, uint32_t clkcfg)
 
static void hal_udma_i2s_clkcfg_set (uint32_t device_id, uint16_t clk_div, uint8_t clk_ena, uint8_t clk_src, uint8_t clk_ext_src, uint8_t clk_edge, uint8_t ws_src, uint8_t ws_ext_src, uint8_t ws_edge, uint8_t ws_type)
 
static uint32_t hal_udma_i2s_glb_reg_get (uint32_t device_id)
 
static void hal_udma_i2s_glb_reg_set (uint32_t device_id, uint32_t glb_setup)
 
static void hal_udma_i2s_glb_set (uint32_t device_id, uint8_t ena, uint8_t frame_length, uint8_t slot_width, uint8_t ws_delay, uint8_t full_duplex_ena, uint8_t pdm_en, uint8_t pdm_2ch_en)
 
static void hal_udma_i2s_enqueue (uint32_t device_id, uint32_t slot_num, uint32_t l2_buf_0, uint32_t l2_buf_1, uint32_t size, uint32_t cfg, udma_channel_e channel)
 

Macro Definition Documentation

#define I2S_CLK_DISABLE

Referenced by __pi_i2s_suspend().

#define I2S_CLK_EDGE_FALL
#define I2S_CLK_EDGE_RISE

Referenced by __pi_i2s_open().

#define I2S_CLK_ENABLE

Referenced by __pi_i2s_resume().

#define I2S_CLK_EXT_SRC_INT
#define I2S_CLK_EXT_SRC_PAD

Referenced by __pi_i2s_open().

#define I2S_CLK_SRC_EXT
#define I2S_CLK_SRC_INT
#define I2S_GLB_DISABLE

Referenced by __pi_i2s_suspend().

#define I2S_GLB_DUPLEX_DIS
#define I2S_GLB_DUPLEX_ENA
#define I2S_GLB_ENABLE

Referenced by __pi_i2s_resume().

#define I2S_GLB_PDM_2CH_DIS

Referenced by __pi_i2s_open().

#define I2S_GLB_PDM_2CH_ENA
#define I2S_GLB_PDM_DIS
#define I2S_GLB_PDM_ENA
#define I2S_SLOT_DISABLE
#define I2S_SLOT_ENABLE
#define I2S_WORD_SIZE_08
#define I2S_WORD_SIZE_16
#define I2S_WORD_SIZE_24
#define I2S_WORD_SIZE_32
#define I2S_WS_EDGE_FALL
#define I2S_WS_EDGE_RISE

Referenced by __pi_i2s_open().

#define I2S_WS_EXT_SRC_INT
#define I2S_WS_EXT_SRC_PAD

Referenced by __pi_i2s_open().

#define I2S_WS_SRC_EXT
#define I2S_WS_SRC_INT
#define I2S_WS_TYPE_DONT_CARE
#define I2S_WS_TYPE_N_2_SLOT
#define I2S_WS_TYPE_PULSE

Referenced by __pi_i2s_open().

#define I2S_WS_TYPE_STATE

Function Documentation

static uint32_t hal_udma_i2s_clkcfg_reg_get ( uint32_t  device_id)
inlinestatic

I2S_CLKCFG_SETUP Register.

References udma_i2s, and udma_i2s_clkcfg_setup_get().

Referenced by __pi_i2s_resume().

static void hal_udma_i2s_clkcfg_reg_set ( uint32_t  device_id,
uint32_t  clkcfg 
)
inlinestatic
static void hal_udma_i2s_clkcfg_set ( uint32_t  device_id,
uint16_t  clk_div,
uint8_t  clk_ena,
uint8_t  clk_src,
uint8_t  clk_ext_src,
uint8_t  clk_edge,
uint8_t  ws_src,
uint8_t  ws_ext_src,
uint8_t  ws_edge,
uint8_t  ws_type 
)
inlinestatic
static void hal_udma_i2s_enqueue ( uint32_t  device_id,
uint32_t  slot_num,
uint32_t  l2_buf_0,
uint32_t  l2_buf_1,
uint32_t  size,
uint32_t  cfg,
udma_channel_e  channel 
)
inlinestatic
static uint32_t hal_udma_i2s_glb_reg_get ( uint32_t  device_id)
inlinestatic

I2S_GLB_SETUP Register.

References udma_i2s, and udma_i2s_glb_setup_get().

Referenced by __pi_i2s_resume().

static void hal_udma_i2s_glb_reg_set ( uint32_t  device_id,
uint32_t  glb_setup 
)
inlinestatic
static void hal_udma_i2s_glb_set ( uint32_t  device_id,
uint8_t  ena,
uint8_t  frame_length,
uint8_t  slot_width,
uint8_t  ws_delay,
uint8_t  full_duplex_ena,
uint8_t  pdm_en,
uint8_t  pdm_2ch_en 
)
inlinestatic
static uint32_t hal_udma_i2s_slot_cfg_get ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic

References udma_i2s, and udma_i2s_slot_cfg_get().

Referenced by __pi_i2s_resume().

static void hal_udma_i2s_slot_cfg_rx_disable ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic
static void hal_udma_i2s_slot_cfg_rx_enable ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic
static void hal_udma_i2s_slot_cfg_rx_set ( uint32_t  device_id,
uint8_t  slot_num,
int8_t  udma_chan_id,
uint8_t  ena,
uint8_t  msb,
uint8_t  left_align,
uint8_t  udma_size,
uint8_t  sign_ena 
)
inlinestatic
static void hal_udma_i2s_slot_cfg_set ( uint32_t  device_id,
uint8_t  slot_num,
uint32_t  cfg 
)
inlinestatic

References udma_i2s, and udma_i2s_slot_cfg_set().

Referenced by __pi_i2s_resume().

static void hal_udma_i2s_slot_cfg_tx_disable ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic
static void hal_udma_i2s_slot_cfg_tx_enable ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic
static void hal_udma_i2s_slot_cfg_tx_set ( uint32_t  device_id,
uint8_t  slot_num,
int8_t  udma_chan_id,
uint8_t  ena,
uint8_t  msb,
uint8_t  left_align,
uint8_t  udma_size,
uint8_t  sign_ena,
uint8_t  byp 
)
inlinestatic
static uint32_t hal_udma_i2s_slot_en_get ( uint32_t  device_id)
inlinestatic

SLOT_EN Register.

References udma_i2s, and udma_i2s_slot_en_get().

Referenced by __pi_i2s_resume().

static void hal_udma_i2s_slot_en_set ( uint32_t  device_id,
uint32_t  enable 
)
inlinestatic
static uint32_t hal_udma_i2s_slot_rx_chan_id_get ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic

References udma_i2s, and udma_i2s_slot_cfg_get().

Referenced by hal_udma_i2s_enqueue().

static uint32_t hal_udma_i2s_slot_tx_chan_id_get ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic

References udma_i2s, and udma_i2s_slot_cfg_get().

Referenced by hal_udma_i2s_enqueue().

static uint32_t hal_udma_i2s_word_size_get ( uint32_t  device_id,
uint8_t  slot_num 
)
inlinestatic
static void hal_udma_i2s_word_size_rx_set ( uint32_t  device_id,
uint8_t  slot_num,
uint8_t  size 
)
inlinestatic
static void hal_udma_i2s_word_size_tx_set ( uint32_t  device_id,
uint8_t  slot_num,
uint8_t  size 
)
inlinestatic
static void udma_i2s_slot_cfg_set ( uint32_t  base,
uint8_t  slot_num,
uint32_t  cfg 
)
inlinestatic
static uint32_t udma_i2s_word_size_get ( uint32_t  base,
uint8_t  slot_num 
)
inlinestatic
static void udma_i2s_word_size_set ( uint32_t  base,
uint8_t  slot_num,
uint32_t  word_size 
)
inlinestatic