OpenBIC
OpenSource Bridge-IC
hal_i2c.h File Reference
#include <drivers/i2c.h>
#include <drivers/i2c/slave/ipmb.h>
Include dependency graph for hal_i2c.h:

Go to the source code of this file.

Classes

struct  _I2C_MSG_
 

Macros

#define DEV_I2C(n)   DEV_I2C_##n
 
#define I2C_BUFF_SIZE   256
 
#define MUTEX_LOCK_ENABLE   true
 
#define MUTEX_LOCK_DISENABLE   false
 

Typedefs

typedef struct _I2C_MSG_ I2C_MSG
 

Enumerations

enum  I2C_TRANSFER_TYPE { I2C_READ , I2C_WRITE }
 

Functions

int i2c_freq_set (uint8_t i2c_bus, uint8_t i2c_speed_mode, uint8_t en_slave)
 
int i2c_addr_set (uint8_t i2c_bus, uint8_t i2c_addr)
 
int i2c_master_read (I2C_MSG *msg, uint8_t retry)
 
int i2c_master_read_without_mutex (I2C_MSG *msg, uint8_t retry)
 
int i2c_master_write (I2C_MSG *msg, uint8_t retry)
 
int i2c_master_write_without_mutex (I2C_MSG *msg, uint8_t retry)
 
void i2c_scan (uint8_t bus, uint8_t *target_addr, uint8_t *target_addr_len)
 
void util_init_I2C (void)
 
int check_i2c_bus_valid (uint8_t bus)
 

Macro Definition Documentation

◆ DEV_I2C

#define DEV_I2C (   n)    DEV_I2C_##n

◆ I2C_BUFF_SIZE

#define I2C_BUFF_SIZE   256

◆ MUTEX_LOCK_DISENABLE

#define MUTEX_LOCK_DISENABLE   false

◆ MUTEX_LOCK_ENABLE

#define MUTEX_LOCK_ENABLE   true

Typedef Documentation

◆ I2C_MSG

typedef struct _I2C_MSG_ I2C_MSG

Enumeration Type Documentation

◆ I2C_TRANSFER_TYPE

Enumerator
I2C_READ 
I2C_WRITE 

Function Documentation

◆ check_i2c_bus_valid()

int check_i2c_bus_valid ( uint8_t  bus)

◆ i2c_addr_set()

int i2c_addr_set ( uint8_t  i2c_bus,
uint8_t  i2c_addr 
)
Here is the call graph for this function:

◆ i2c_freq_set()

int i2c_freq_set ( uint8_t  i2c_bus,
uint8_t  i2c_speed_mode,
uint8_t  en_slave 
)
Here is the call graph for this function:

◆ i2c_master_read()

int i2c_master_read ( I2C_MSG msg,
uint8_t  retry 
)
Here is the call graph for this function:

◆ i2c_master_read_without_mutex()

int i2c_master_read_without_mutex ( I2C_MSG msg,
uint8_t  retry 
)
Here is the call graph for this function:

◆ i2c_master_write()

int i2c_master_write ( I2C_MSG msg,
uint8_t  retry 
)
Here is the call graph for this function:

◆ i2c_master_write_without_mutex()

int i2c_master_write_without_mutex ( I2C_MSG msg,
uint8_t  retry 
)
Here is the call graph for this function:

◆ i2c_scan()

void i2c_scan ( uint8_t  bus,
uint8_t *  target_addr,
uint8_t *  target_addr_len 
)
Here is the call graph for this function:

◆ util_init_I2C()

void util_init_I2C ( void  )