OpenBIC
OpenSource Bridge-IC
plat_i2c_target.c File Reference
#include <zephyr.h>
#include <stdio.h>
#include <stdlib.h>
#include "pldm_sensor.h"
#include "plat_i2c_target.h"
Include dependency graph for plat_i2c_target.c:

Macros

#define DATA_TABLE_LENGTH_4   4
 
#define SENSOR_READING_PDR_INDEX_MAX   50
 

Functions

void update_sensor_reading_by_sensor_number (uint8_t sensor_number)
 
int get_cached_sensor_reading_by_sensor_number (uint8_t sensor_number)
 

Variables

plat_sensor_readingsensor_reading_table [DATA_TABLE_LENGTH_4] = { NULL }
 
const bool I2C_TARGET_ENABLE_TABLE [MAX_TARGET_NUM]
 
const struct _i2c_target_config I2C_TARGET_CONFIG_TABLE [MAX_TARGET_NUM]
 

Macro Definition Documentation

◆ DATA_TABLE_LENGTH_4

#define DATA_TABLE_LENGTH_4   4

◆ SENSOR_READING_PDR_INDEX_MAX

#define SENSOR_READING_PDR_INDEX_MAX   50

Function Documentation

◆ get_cached_sensor_reading_by_sensor_number()

int get_cached_sensor_reading_by_sensor_number ( uint8_t  sensor_number)

◆ update_sensor_reading_by_sensor_number()

void update_sensor_reading_by_sensor_number ( uint8_t  sensor_number)
Here is the call graph for this function:

Variable Documentation

◆ I2C_TARGET_CONFIG_TABLE

const struct _i2c_target_config I2C_TARGET_CONFIG_TABLE[MAX_TARGET_NUM]
Initial value:
= {
{ 0xFF, 0xA }, { 0xFF, 0xA }, { 0xFF, 0xA },
{ 0xFF, 0xA }, { 0xFF, 0xA }, { 0x42, 0xA },
{ 0x40, 0xA }, { 0xFF, 0xA }, { 0xFF, 0xA },
{ 0xFF, 0xA }, { 0xFF, 0xA }, { 0xFF, 0xA },
}

◆ I2C_TARGET_ENABLE_TABLE

const bool I2C_TARGET_ENABLE_TABLE[MAX_TARGET_NUM]
Initial value:
= {
}
#define TARGET_DISABLE
Definition: plat_i2c_target.h:24
#define TARGET_ENABLE
Definition: plat_i2c_target.h:23

◆ sensor_reading_table

plat_sensor_reading* sensor_reading_table[DATA_TABLE_LENGTH_4] = { NULL }