OpenBIC
OpenSource Bridge-IC
|
#include <zephyr.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "cmsis_os2.h"
#include "hal_i2c.h"
#include "timer.h"
#include "plat_i2c.h"
#include "libutil.h"
#include <logging/log.h>
Functions | |
LOG_MODULE_REGISTER (hal_i2c) | |
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_write (I2C_MSG *msg, uint8_t retry) |
int | i2c_master_read_without_mutex (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) |
Variables | |
struct k_mutex | i2c_mutex [I2C_BUS_MAX_NUM] |
int check_i2c_bus_valid | ( | uint8_t | bus | ) |
int i2c_addr_set | ( | uint8_t | i2c_bus, |
uint8_t | i2c_addr | ||
) |
int i2c_freq_set | ( | uint8_t | i2c_bus, |
uint8_t | i2c_speed_mode, | ||
uint8_t | en_slave | ||
) |
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 | ||
) |
LOG_MODULE_REGISTER | ( | hal_i2c | ) |
void util_init_I2C | ( | void | ) |
struct k_mutex i2c_mutex[I2C_BUS_MAX_NUM] |