OpenBIC
OpenSource Bridge-IC
|
#include <stdlib.h>
#include <logging/log.h>
#include "util_spi.h"
#include "pt5161l.h"
#include "hal_i2c.h"
#include "libutil.h"
#include "sensor.h"
Functions | |
LOG_MODULE_REGISTER (dev_pt5161l) | |
K_MUTEX_DEFINE (pt5161l_mutex) | |
bool | pt5161l_get_vendor_id (I2C_MSG *msg) |
bool | pt5161l_write_block_data (I2C_MSG *msg, uint32_t address, uint8_t num_bytes, uint8_t *values) |
bool | pt5161l_read_block_data (I2C_MSG *msg, uint32_t address, uint8_t num_bytes, uint8_t *values) |
bool | pt5161l_read_block_data_to_sram (I2C_MSG *msg, uint32_t micro_ind_struct_oft, uint32_t eeprom_offset, uint8_t num_bytes, uint8_t *values) |
bool | pt5161l_i2c_master_soft_reset (I2C_MSG *msg) |
bool | pt5161l_i2c_master_write_ctrl_reg (I2C_MSG *msg, uint32_t offset, uint8_t length, uint8_t *data) |
bool | pt5161l_i2c_master_init (I2C_MSG *msg) |
bool | pt5161l_i2c_master_set_page (I2C_MSG *msg, int page) |
bool | pt5161l_i2c_master_multi_block_write (I2C_MSG *msg, uint16_t offset, int num_bytes, uint8_t *values) |
bool | pt5161l_pre_update (I2C_MSG *msg) |
bool | pt5161l_write_eeprom_image (I2C_MSG *msg, uint32_t offset, uint8_t *txbuf, uint16_t length, bool is_end) |
bool | pt5161l_post_update (I2C_MSG *msg) |
uint8_t | pt5161l_do_update (I2C_MSG *msg, uint32_t update_offset, uint8_t *txbuf, uint16_t length, bool is_end) |
uint8_t | pcie_retimer_fw_update (I2C_MSG *msg, uint32_t offset, uint16_t msg_len, uint8_t *msg_buf, uint8_t flag) |
bool | pt5161l_get_fw_version (I2C_MSG *msg, uint8_t *version) |
bool | get_temp_calibration_codes (I2C_MSG *msg, pt5161l_init_arg *init_args) |
uint8_t | pt5161l_read_avg_temp (I2C_MSG *i2c_msg, uint8_t temp_cal_code_avg, double *avg_temperature) |
uint8_t | pt5161l_read (sensor_cfg *cfg, int *reading) |
uint8_t | pt5161l_init (sensor_cfg *cfg) |
Variables | |
uint8_t | PT5161L_VENDOR_ID [7] = { 0x06, 0x04, 0x00, 0x01, 0x00, 0xFA, 0x1D } |
bool get_temp_calibration_codes | ( | I2C_MSG * | msg, |
pt5161l_init_arg * | init_args | ||
) |
K_MUTEX_DEFINE | ( | pt5161l_mutex | ) |
LOG_MODULE_REGISTER | ( | dev_pt5161l | ) |
uint8_t pcie_retimer_fw_update | ( | I2C_MSG * | msg, |
uint32_t | offset, | ||
uint16_t | msg_len, | ||
uint8_t * | msg_buf, | ||
uint8_t | flag | ||
) |
uint8_t pt5161l_do_update | ( | I2C_MSG * | msg, |
uint32_t | update_offset, | ||
uint8_t * | txbuf, | ||
uint16_t | length, | ||
bool | is_end | ||
) |
bool pt5161l_get_fw_version | ( | I2C_MSG * | msg, |
uint8_t * | version | ||
) |
bool pt5161l_get_vendor_id | ( | I2C_MSG * | msg | ) |
bool pt5161l_i2c_master_init | ( | I2C_MSG * | msg | ) |
bool pt5161l_i2c_master_multi_block_write | ( | I2C_MSG * | msg, |
uint16_t | offset, | ||
int | num_bytes, | ||
uint8_t * | values | ||
) |
bool pt5161l_i2c_master_set_page | ( | I2C_MSG * | msg, |
int | page | ||
) |
bool pt5161l_i2c_master_soft_reset | ( | I2C_MSG * | msg | ) |
bool pt5161l_i2c_master_write_ctrl_reg | ( | I2C_MSG * | msg, |
uint32_t | offset, | ||
uint8_t | length, | ||
uint8_t * | data | ||
) |
uint8_t pt5161l_init | ( | sensor_cfg * | cfg | ) |
bool pt5161l_post_update | ( | I2C_MSG * | msg | ) |
bool pt5161l_pre_update | ( | I2C_MSG * | msg | ) |
uint8_t pt5161l_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
uint8_t pt5161l_read_avg_temp | ( | I2C_MSG * | i2c_msg, |
uint8_t | temp_cal_code_avg, | ||
double * | avg_temperature | ||
) |
bool pt5161l_read_block_data | ( | I2C_MSG * | msg, |
uint32_t | address, | ||
uint8_t | num_bytes, | ||
uint8_t * | values | ||
) |
bool pt5161l_read_block_data_to_sram | ( | I2C_MSG * | msg, |
uint32_t | micro_ind_struct_oft, | ||
uint32_t | eeprom_offset, | ||
uint8_t | num_bytes, | ||
uint8_t * | values | ||
) |
bool pt5161l_write_block_data | ( | I2C_MSG * | msg, |
uint32_t | address, | ||
uint8_t | num_bytes, | ||
uint8_t * | values | ||
) |
bool pt5161l_write_eeprom_image | ( | I2C_MSG * | msg, |
uint32_t | offset, | ||
uint8_t * | txbuf, | ||
uint16_t | length, | ||
bool | is_end | ||
) |
uint8_t PT5161L_VENDOR_ID[7] = { 0x06, 0x04, 0x00, 0x01, 0x00, 0xFA, 0x1D } |