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_i2c.h File Reference

Macros

#define I2C_STATUS_FOLL_EOF_RCV_EVENT
 
#define I2C_STATUS_FOLL_EOF_SND_EVENT
 
#define I2C_STATUS_FOLL_ERROR_ARLO_EVENT
 
#define I2C_STATUS_FOLL_ERROR_FRAMING_EVENT
 
#define I2C_FLAG_CMD_EVENT_I
 
#define I2C_FLAG_FOLL_UNLOCK_EVENT_O
 
#define I2C_FLAG_FOLL_PURGE_EVENT_O
 
#define I2C_STATUS_ERROR_NACK_EVENT
 
#define I2C_STATUS_ERROR_ARLO_EVENT
 
#define I2C_STATUS_ERROR_FRAMING_EVENT
 
#define I2C_FLAG_UNLOCK_EVENT_O
 
#define I2C_FLAG_PURGE_EVENT_O
 
#define I2C_FLAG_SOFT_RESET_EVENT
 
#define I2C_FLAG_PRESC_DIV10_EVENT_O
 
#define I2C_CMD_TIMING(T)
 
#define I2C_CMD_EVENT(T)
 
#define CMD_FOLL_ADDR(match_id, push_en, addr_10_bit, slave_addr, mask, sof, eof)
 
#define __I2C_NACK_STOP
 
#define I2C_CMD_LEAD_START(T)
 
#define I2C_CMD_MISC_WAIT(T)
 
#define I2C_CMD_NOP(T)
 
#define I2C_CMD_RPT(T)
 
#define I2C_CMD_LEAD_SEND_IMM(T)
 
#define I2C_CMD_LEAD_SEND_IMM_ADDR(IS_10BITS, T)
 
#define I2C_CMD_MISC_RECEIVE(T)
 
#define I2C_CMD_MISC_RECEIVE_LAST(T)
 
#define I2C_CMD_MISC_SEND(T)
 
#define I2C_CMD_STOP(T)
 
#define I2C_CMD_UDMA_TX_CHAN_CFG(T)
 
#define I2C_CMD_UDMA_RX_CHAN_CFG(T)
 
#define I2C_CHAN_ADDR_REG
 
#define I2C_CHAN_SIZE_REG
 
#define I2C_CHAN_CFG_REG
 

Enumerations

enum  pi_i2c_mode_e
 

Functions

static void hal_udma_i2c_rx_dest_set (uint32_t device_id, int32_t udma_chan_id)
 
static uint32_t hal_udma_i2c_rx_dest_get (uint32_t device_id)
 
static void hal_udma_i2c_tx_dest_set (uint32_t device_id, int32_t udma_chan_id)
 
static uint32_t hal_udma_i2c_tx_dest_get (uint32_t device_id)
 
static void hal_udma_i2c_cmd_dest_set (uint32_t device_id, int32_t udma_chan_id)
 
static uint32_t hal_udma_i2c_cmd_dest_get (uint32_t device_id)
 
static void hal_udma_i2c_slave_rx_dest_set (uint32_t device_id, int32_t udma_chan_id)
 
static uint32_t hal_udma_i2c_slave_rx_dest_get (uint32_t device_id)
 
static void hal_udma_i2c_slave_tx_dest_set (uint32_t device_id, int32_t udma_chan_id)
 
static uint32_t hal_udma_i2c_slave_tx_dest_get (uint32_t device_id)
 
static uint32_t hal_udma_i2c_get_event_by_id (int device_id, int event_id)
 
static void hal_udma_i2c_set_event_by_id (int device_id, int event_id)
 
static void hal_udma_i2c_clr_event_by_id (int device_id, int event_id)
 
static void hal_udma_i2c_clr_event_mask (int device_id, uint32_t mask)
 
static uint32_t hal_udma_i2c_get_event (int device_id)
 
static void hal_udma_i2c_enqueue (int device_id, void *addr, uint32_t size, udma_channel_e channel)
 
static uint32_t hal_udma_i2c_get_bytes_left (int device_id, udma_channel_e channel)
 
static void hal_udma_i2c_channel_stop (int device_id, udma_channel_e channel)
 
static void hal_udma_i2c_slave_channel_stop (int device_id, udma_channel_e channel)
 
static void hal_udma_i2c_slave_enqueue (int device_id, void *addr, uint32_t size, udma_channel_e channel)
 

Macro Definition Documentation

#define __I2C_NACK_STOP
#define CMD_FOLL_ADDR (   match_id,
  push_en,
  addr_10_bit,
  slave_addr,
  mask,
  sof,
  eof 
)

Referenced by __pi_i2c_slave_open().

#define I2C_CHAN_ADDR_REG
#define I2C_CHAN_CFG_REG
#define I2C_CHAN_SIZE_REG
#define I2C_CMD_LEAD_SEND_IMM (   T)
#define I2C_CMD_LEAD_SEND_IMM_ADDR (   IS_10BITS,
 
)
#define I2C_CMD_MISC_RECEIVE (   T)
#define I2C_CMD_MISC_RECEIVE_LAST (   T)
#define I2C_CMD_MISC_SEND (   T)
#define I2C_CMD_MISC_WAIT (   T)
#define I2C_CMD_RPT (   T)
#define I2C_CMD_STOP (   T)
#define I2C_CMD_TIMING (   T)
#define I2C_CMD_UDMA_RX_CHAN_CFG (   T)
#define I2C_CMD_UDMA_TX_CHAN_CFG (   T)
#define I2C_FLAG_CMD_EVENT_I
#define I2C_FLAG_FOLL_PURGE_EVENT_O
#define I2C_FLAG_FOLL_UNLOCK_EVENT_O
#define I2C_FLAG_PRESC_DIV10_EVENT_O
#define I2C_FLAG_PURGE_EVENT_O

Referenced by __pi_i2c_handle_error().

#define I2C_FLAG_SOFT_RESET_EVENT
#define I2C_FLAG_UNLOCK_EVENT_O

Referenced by __pi_i2c_handle_error().

#define I2C_STATUS_ERROR_ARLO_EVENT

Referenced by __pi_i2c_handle_error().

#define I2C_STATUS_ERROR_FRAMING_EVENT

Referenced by __pi_i2c_handle_error().

#define I2C_STATUS_ERROR_NACK_EVENT

Referenced by __pi_i2c_handle_error().

#define I2C_STATUS_FOLL_EOF_RCV_EVENT

Referenced by __pi_i2c_slave_unlock().

#define I2C_STATUS_FOLL_EOF_SND_EVENT

Referenced by __pi_i2c_slave_unlock().

#define I2C_STATUS_FOLL_ERROR_ARLO_EVENT
#define I2C_STATUS_FOLL_ERROR_FRAMING_EVENT

Enumeration Type Documentation

Enumerator
PI_I2C_STD_MODE 
PI_I2C_FAST_MODE 
PI_I2C_NB_MODES 

Function Documentation

static void hal_udma_i2c_clr_event_by_id ( int  device_id,
int  event_id 
)
inlinestatic

set value of event in i2c event register

References udma_i2c, and udma_i2c_status_reg_idx_set().

Referenced by __pi_i2c_open(), and __pi_i2c_slave_open().

static void hal_udma_i2c_clr_event_mask ( int  device_id,
uint32_t  mask 
)
inlinestatic
static uint32_t hal_udma_i2c_cmd_dest_get ( uint32_t  device_id)
inlinestatic
static void hal_udma_i2c_cmd_dest_set ( uint32_t  device_id,
int32_t  udma_chan_id 
)
inlinestatic

CMD_DEST Register.

References udma_i2c, and udma_i2c_udma_cmd_dest_reg_idx_set().

Referenced by __pi_i2c_open(), and __pi_i2c_slave_open().

static uint32_t hal_udma_i2c_get_event ( int  device_id)
inlinestatic
static uint32_t hal_udma_i2c_get_event_by_id ( int  device_id,
int  event_id 
)
inlinestatic

get_current value of event in i2c event register

References udma_i2c, and udma_i2c_status_reg_idx_get().

Referenced by __pi_i2c_handle_error(), __pi_i2c_open(), __pi_i2c_slave_handle_error(), and __pi_i2c_slave_open().

static uint32_t hal_udma_i2c_rx_dest_get ( uint32_t  device_id)
inlinestatic
static void hal_udma_i2c_rx_dest_set ( uint32_t  device_id,
int32_t  udma_chan_id 
)
inlinestatic

RX_DEST Register.

References udma_i2c, and udma_i2c_lead_udma_rx_dest_reg_idx_set().

Referenced by __pi_i2c_open().

static void hal_udma_i2c_set_event_by_id ( int  device_id,
int  event_id 
)
inlinestatic

set value of event in i2c event register

References udma_i2c, udma_i2c_status_reg_idx_get(), and udma_i2c_status_reg_idx_set().

Referenced by __pi_i2c_open(), and __pi_i2c_slave_open().

static void hal_udma_i2c_slave_enqueue ( int  device_id,
void *  addr,
uint32_t  size,
udma_channel_e  channel 
)
inlinestatic
static uint32_t hal_udma_i2c_slave_rx_dest_get ( uint32_t  device_id)
inlinestatic
static void hal_udma_i2c_slave_rx_dest_set ( uint32_t  device_id,
int32_t  udma_chan_id 
)
inlinestatic

SLAVE RX_DEST Register.

References udma_i2c, and udma_i2c_foll_udma_rx_dest_reg_idx_set().

Referenced by __pi_i2c_slave_open().

static uint32_t hal_udma_i2c_slave_tx_dest_get ( uint32_t  device_id)
inlinestatic
static void hal_udma_i2c_slave_tx_dest_set ( uint32_t  device_id,
int32_t  udma_chan_id 
)
inlinestatic

SLAVE TX_DEST Register.

References udma_i2c, and udma_i2c_foll_udma_tx_dest_reg_idx_set().

Referenced by __pi_i2c_slave_open().

static uint32_t hal_udma_i2c_tx_dest_get ( uint32_t  device_id)
inlinestatic
static void hal_udma_i2c_tx_dest_set ( uint32_t  device_id,
int32_t  udma_chan_id 
)
inlinestatic

TX_DEST Register.

References udma_i2c, and udma_i2c_lead_udma_tx_dest_reg_idx_set().

Referenced by __pi_i2c_open().