OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <logging/log.h>
#include "tda38741.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "libutil.h"
Classes | |
struct | tda38640_config_sect |
struct | tda38640_config |
Macros | |
#define | TDA38640_CNFG_BYTE_NUM 4 |
#define | TDA38640_MAX_SECT_NUM 48 |
#define | TDA38640_SECT_COLUMN_NUM 64 |
#define | CHECKSUM_FIELD "[Image 00] : " |
#define | IMAGE_COUNT "Image Count : " |
#define | CNFG_TAG "[CNFG]" |
#define | DATA_END_TAG "[End]" |
#define | DATA_COMMENT "//" |
#define | DATA_LEN_IN_LINE 17 |
#define | CNFG_REMAINING_WRITES_MAX 5 |
#define | USER_REMAINING_WRITES_MAX 48 |
#define | VR_PROGRAM_DELAY 200 |
#define | VR_PROGRAM_RECHECK 3 |
Enumerations | |
enum | { CRC_HIGH_REG = 0xAE , CRC_LOW_REG = 0xB0 , CNFG_REG = 0xB2 , USER_1_REG = 0xB4 , USER_2_REG = 0xB6 , USER_3_REG = 0xB8 , UNLOCK_REGS_REG = 0xD4 , PROG_CMD_REG = 0xD6 , PAGE_REG = 0xff } |
enum | { CNFG_WR = 0x12 , USER_RD = 0x41 , USER_WR = 0x42 } |
enum | { VR_PAGE_0 } |
Functions | |
LOG_MODULE_REGISTER (tda38741) | |
int | pal_bitcount (unsigned int val) |
bool | tda38741_get_remaining_wr (uint8_t bus, uint8_t addr, uint8_t *user_remain, uint8_t *cnfg_remain) |
bool | tda38741_get_checksum (uint8_t bus, uint8_t addr, uint32_t *crc) |
bool | tda38741_fwupdate (uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size) |
#define CHECKSUM_FIELD "[Image 00] : " |
#define CNFG_REMAINING_WRITES_MAX 5 |
#define CNFG_TAG "[CNFG]" |
#define DATA_COMMENT "//" |
#define DATA_END_TAG "[End]" |
#define DATA_LEN_IN_LINE 17 |
#define IMAGE_COUNT "Image Count : " |
#define TDA38640_CNFG_BYTE_NUM 4 |
#define TDA38640_MAX_SECT_NUM 48 |
#define TDA38640_SECT_COLUMN_NUM 64 |
#define USER_REMAINING_WRITES_MAX 48 |
#define VR_PROGRAM_DELAY 200 |
#define VR_PROGRAM_RECHECK 3 |
anonymous enum |
LOG_MODULE_REGISTER | ( | tda38741 | ) |
int pal_bitcount | ( | unsigned int | val | ) |
bool tda38741_fwupdate | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t * | img_buff, | ||
uint32_t | img_size | ||
) |
bool tda38741_get_checksum | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint32_t * | crc | ||
) |
bool tda38741_get_remaining_wr | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t * | user_remain, | ||
uint8_t * | cnfg_remain | ||
) |