OpenBIC
OpenSource Bridge-IC
|
#include <zephyr.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <drivers/i2c.h>
#include "hal_i2c_target.h"
#include "libutil.h"
#include "plat_def.h"
#include <logging/log.h>
Macros | |
#define | LOG_LEVEL CONFIG_I2C_LOG_LEVEL |
Functions | |
LOG_MODULE_REGISTER (hal_i2c_target) | |
uint8_t | i2c_target_status_get (uint8_t bus_num) |
uint8_t | i2c_target_cfg_get (uint8_t bus_num, struct _i2c_target_config *cfg) |
uint8_t | i2c_target_status_print (uint8_t bus_num) |
uint8_t | i2c_target_read (uint8_t bus_num, uint8_t *buff, uint16_t buff_len, uint16_t *msg_len) |
uint8_t | i2c_target_write (uint8_t bus_num, uint8_t *buff, uint16_t buff_len) |
int | i2c_target_control (uint8_t bus_num, struct _i2c_target_config *cfg, enum i2c_target_api_control_mode mode) |
Variables | |
struct k_mutex | i2c_target_mutex [MAX_TARGET_NUM] |
#define LOG_LEVEL CONFIG_I2C_LOG_LEVEL |
uint8_t i2c_target_cfg_get | ( | uint8_t | bus_num, |
struct _i2c_target_config * | cfg | ||
) |
int i2c_target_control | ( | uint8_t | bus_num, |
struct _i2c_target_config * | cfg, | ||
enum i2c_target_api_control_mode | mode | ||
) |
uint8_t i2c_target_read | ( | uint8_t | bus_num, |
uint8_t * | buff, | ||
uint16_t | buff_len, | ||
uint16_t * | msg_len | ||
) |
uint8_t i2c_target_status_get | ( | uint8_t | bus_num | ) |
uint8_t i2c_target_status_print | ( | uint8_t | bus_num | ) |
uint8_t i2c_target_write | ( | uint8_t | bus_num, |
uint8_t * | buff, | ||
uint16_t | buff_len | ||
) |
LOG_MODULE_REGISTER | ( | hal_i2c_target | ) |
struct k_mutex i2c_target_mutex[MAX_TARGET_NUM] |