OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <string.h>
#include <logging/log.h>
#include <stdlib.h>
#include "libutil.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "util_pmbus.h"
#include "tps53689.h"
Macros | |
#define | TI_REG_NVM_CHECKSUM 0xF4 |
#define | TI_REG_USER_NVM_INDEX 0xF5 |
#define | TI_REG_USER_NVM_EXECUTE 0xF6 |
Enumerations | |
enum | LINE_INDEX { FIRST_LINE = 1 , DEV_ID_LINE = 2 , LAST_LINE = 11 } |
enum | LINE_FORMAT { HEADER_LEN = 8 , DATA_LEN = 32 } |
enum | DEV_ID_LINE_OFFSET { DEV_REV1_OFFSET = 6 , DEV_REV2_OFFSET = 7 , ADDR_OFFSET = 8 , CRC1_OFFSET = 9 , CRC2_OFFSET = 10 } |
Functions | |
LOG_MODULE_REGISTER (tps53689) | |
bool | tps536xx_parse_image (uint8_t *img_buff, uint32_t img_size, struct tps_config *cfg) |
bool | tps536xx_get_crc (uint8_t bus, uint8_t addr, uint32_t *crc) |
bool | tps536xx_fwupdate (uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size) |
uint8_t | tps53689_read (sensor_cfg *cfg, int *reading) |
uint8_t | tps53689_init (sensor_cfg *cfg) |
Variables | |
uint8_t | tps536c5_dev_id [] = { 0x54, 0x49, 0x53, 0x6C, 0x50, 0x00 } |
uint8_t | tps53685_dev_id [] = { 0x54, 0x49, 0x53, 0x68, 0x50, 0x00 } |
#define TI_REG_NVM_CHECKSUM 0xF4 |
#define TI_REG_USER_NVM_EXECUTE 0xF6 |
#define TI_REG_USER_NVM_INDEX 0xF5 |
enum DEV_ID_LINE_OFFSET |
enum LINE_FORMAT |
enum LINE_INDEX |
LOG_MODULE_REGISTER | ( | tps53689 | ) |
uint8_t tps53689_init | ( | sensor_cfg * | cfg | ) |
uint8_t tps53689_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
bool tps536xx_fwupdate | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t * | img_buff, | ||
uint32_t | img_size | ||
) |
bool tps536xx_get_crc | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint32_t * | crc | ||
) |
bool tps536xx_parse_image | ( | uint8_t * | img_buff, |
uint32_t | img_size, | ||
struct tps_config * | cfg | ||
) |
uint8_t tps53685_dev_id[] = { 0x54, 0x49, 0x53, 0x68, 0x50, 0x00 } |
uint8_t tps536c5_dev_id[] = { 0x54, 0x49, 0x53, 0x6C, 0x50, 0x00 } |