OpenBIC
OpenSource Bridge-IC
|
#include <zephyr.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libutil.h"
#include "plat_i2c_target.h"
#include "plat_i2c.h"
#include <logging/log.h>
#include "plat_gpio.h"
#include "plat_pldm_sensor.h"
#include "pldm_sensor.h"
#include "plat_version.h"
#include "plat_isr.h"
#include "plat_hook.h"
#include "plat_fru.h"
Macros | |
#define | DEVICE_TYPE 0x01 |
#define | REGISTER_LAYOUT_VERSION 0x01 |
#define | AEGIS_CARRIER_BOARD_ID 0x0000 |
#define | AEGIS_CPLD_ADDR (0x4C >> 1) |
#define | DATA_TABLE_LENGTH_1 1 |
#define | DATA_TABLE_LENGTH_2 2 |
#define | DATA_TABLE_LENGTH_4 4 |
#define | DATA_TABLE_LENGTH_7 7 |
#define | DATA_TABLE_LENGTH_13 13 |
#define | SENSOR_INIT_PDR_INDEX_MAX 248 |
#define | SENSOR_READING_PDR_INDEX_MAX 50 |
#define | PLAT_MASTER_WRITE_STACK_SIZE 1024 |
#define | STRAP_SET_TYPE 0x44 |
#define | TELEMETRY_MSG_MAX_LENGTH 32 |
#define AEGIS_CARRIER_BOARD_ID 0x0000 |
#define AEGIS_CPLD_ADDR (0x4C >> 1) |
#define DATA_TABLE_LENGTH_1 1 |
#define DATA_TABLE_LENGTH_13 13 |
#define DATA_TABLE_LENGTH_2 2 |
#define DATA_TABLE_LENGTH_4 4 |
#define DATA_TABLE_LENGTH_7 7 |
#define DEVICE_TYPE 0x01 |
#define PLAT_MASTER_WRITE_STACK_SIZE 1024 |
#define REGISTER_LAYOUT_VERSION 0x01 |
#define SENSOR_INIT_PDR_INDEX_MAX 248 |
#define SENSOR_READING_PDR_INDEX_MAX 50 |
#define STRAP_SET_TYPE 0x44 |
#define TELEMETRY_MSG_MAX_LENGTH 32 |
struct __attribute__ | ( | (__packed__) | ) |
void * allocate_sensor_data_table | ( | void ** | buffer, |
size_t | buffer_size | ||
) |
bool get_fru_info_element | ( | telemetry_info * | telemetry_info, |
char ** | fru_element, | ||
uint8_t * | fru_element_size | ||
) |
void i2c_bridge_command_handler | ( | struct k_work * | work_item | ) |
bool initialize_sensor_data_0_1 | ( | telemetry_info * | telemetry_info, |
uint8_t * | buffer_size | ||
) |
bool initialize_sensor_data_2_5 | ( | telemetry_info * | telemetry_info, |
uint8_t * | buffer_size | ||
) |
bool initialize_sensor_data_6 | ( | telemetry_info * | telemetry_info, |
uint8_t * | buffer_size | ||
) |
bool initialize_sensor_data_60_66 | ( | telemetry_info * | telemetry_info, |
uint8_t * | buffer_size | ||
) |
bool initialize_sensor_data_70_76 | ( | telemetry_info * | telemetry_info, |
uint8_t * | buffer_size | ||
) |
bool initialize_sensor_data_8 | ( | telemetry_info * | telemetry_info, |
uint8_t * | buffer_size | ||
) |
K_THREAD_STACK_DEFINE | ( | plat_master_write_stack | , |
PLAT_MASTER_WRITE_STACK_SIZE | |||
) |
K_WORK_DEFINE | ( | set_bootstrap_element_work | , |
set_bootstrap_element_handler | |||
) |
LOG_MODULE_REGISTER | ( | plat_i2c_target | ) |
void plat_master_write_thread_handler | ( | ) |
void plat_master_write_thread_init | ( | ) |
void sensor_data_table_init | ( | void | ) |
bool set_bootstrap_element | ( | uint8_t | bootstrap_pin, |
uint8_t | user_setting_level | ||
) |
void set_bootstrap_element_handler | ( | ) |
void set_sensor_polling_handler | ( | struct k_work * | work_item | ) |
void update_sensor_data_2_5_table | ( | void | ) |
void update_sensor_data_8_table | ( | void | ) |
const struct _i2c_target_config I2C_TARGET_CONFIG_TABLE[MAX_TARGET_NUM] |
const bool I2C_TARGET_ENABLE_TABLE[MAX_TARGET_NUM] |
struct k_thread plat_master_write_thread |
k_tid_t plat_master_write_tid |
plat_sensor_init_data_0_1 |
plat_sensor_init_data_2_5 |
plat_sensor_init_data_40 |
plat_sensor_init_data_41 |
plat_sensor_init_data_42 |
plat_sensor_init_data_6 |
plat_sensor_init_data_60_76 |
plat_sensor_init_data_8 |
plat_sensor_init_data_f0 |
sensor_entry |
plat_sensor_init_data_0_1* sensor_init_data_0_1_table[DATA_TABLE_LENGTH_2] = { NULL } |
plat_sensor_init_data_2_5* sensor_init_data_2_5_table[DATA_TABLE_LENGTH_4] = { NULL } |
plat_sensor_init_data_41* sensor_init_data_41_table[DATA_TABLE_LENGTH_1] = { NULL } |
plat_sensor_init_data_42* sensor_init_data_42_table[DATA_TABLE_LENGTH_1] = { NULL } |
plat_sensor_init_data_60_76* sensor_init_data_60_66_table[DATA_TABLE_LENGTH_13] = { NULL } |
plat_sensor_init_data_6* sensor_init_data_6_table[DATA_TABLE_LENGTH_1] = { NULL } |
plat_sensor_init_data_60_76* sensor_init_data_70_76_table[DATA_TABLE_LENGTH_7] = { NULL } |
plat_sensor_init_data_8* sensor_init_data_8_table[DATA_TABLE_LENGTH_1] = { NULL } |
strap_entry |
telemetry_info telemetry_info_table[] |