OpenBIC
OpenSource Bridge-IC
xdpe12284c.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <logging/log.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "util_pmbus.h"
#include "libutil.h"
#include "xdpe12284c.h"
Include dependency graph for xdpe12284c.c:

Classes

struct  xdpe_config
 

Macros

#define VR_XDPE_PAGE_20   0x20
 
#define VR_XDPE_PAGE_32   0x32
 
#define VR_XDPE_PAGE_50   0x50
 
#define VR_XDPE_PAGE_60   0x60
 
#define VR_XDPE_PAGE_62   0x62
 
#define VR_XDPE_REG_REMAIN_WR   0x82
 
#define VR_XDPE_REG_CRC_L   0x42
 
#define VR_XDPE_REG_CRC_H   0x43
 
#define VR_XDPE_REG_NEXT_MEM   0x65
 
#define VR_XDPE_TOTAL_RW_SIZE   1080
 
#define VR_XDPE_REG_LOCK   0x1A
 
#define VR_WARN_REMAIN_WR   3
 
#define MAX_CMD_LINE   1080
 

Enumerations

enum  { VR12 = 1 , VR13 , IMVP9 }
 
enum  { VID_IDENTIFIER = 1 }
 

Functions

 LOG_MODULE_REGISTER (xdpe12284c)
 
bool xdpe12284c_get_checksum (uint8_t bus, uint8_t target_addr, uint8_t *checksum)
 
bool xdpe12284c_get_remaining_write (uint8_t bus, uint8_t target_addr, uint16_t *remain_write)
 
bool xdpe12284c_fwupdate (uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size)
 
uint8_t xdpe12284c_read (sensor_cfg *cfg, int *reading)
 
uint8_t xdpe12284c_init (sensor_cfg *cfg)
 

Macro Definition Documentation

◆ MAX_CMD_LINE

#define MAX_CMD_LINE   1080

◆ VR_WARN_REMAIN_WR

#define VR_WARN_REMAIN_WR   3

◆ VR_XDPE_PAGE_20

#define VR_XDPE_PAGE_20   0x20

◆ VR_XDPE_PAGE_32

#define VR_XDPE_PAGE_32   0x32

◆ VR_XDPE_PAGE_50

#define VR_XDPE_PAGE_50   0x50

◆ VR_XDPE_PAGE_60

#define VR_XDPE_PAGE_60   0x60

◆ VR_XDPE_PAGE_62

#define VR_XDPE_PAGE_62   0x62

◆ VR_XDPE_REG_CRC_H

#define VR_XDPE_REG_CRC_H   0x43

◆ VR_XDPE_REG_CRC_L

#define VR_XDPE_REG_CRC_L   0x42

◆ VR_XDPE_REG_LOCK

#define VR_XDPE_REG_LOCK   0x1A

◆ VR_XDPE_REG_NEXT_MEM

#define VR_XDPE_REG_NEXT_MEM   0x65

◆ VR_XDPE_REG_REMAIN_WR

#define VR_XDPE_REG_REMAIN_WR   0x82

◆ VR_XDPE_TOTAL_RW_SIZE

#define VR_XDPE_TOTAL_RW_SIZE   1080

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
VR12 
VR13 
IMVP9 

◆ anonymous enum

anonymous enum
Enumerator
VID_IDENTIFIER 

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( xdpe12284c  )

◆ xdpe12284c_fwupdate()

bool xdpe12284c_fwupdate ( uint8_t  bus,
uint8_t  addr,
uint8_t *  img_buff,
uint32_t  img_size 
)
Here is the call graph for this function:

◆ xdpe12284c_get_checksum()

bool xdpe12284c_get_checksum ( uint8_t  bus,
uint8_t  target_addr,
uint8_t *  checksum 
)

◆ xdpe12284c_get_remaining_write()

bool xdpe12284c_get_remaining_write ( uint8_t  bus,
uint8_t  target_addr,
uint16_t *  remain_write 
)

◆ xdpe12284c_init()

uint8_t xdpe12284c_init ( sensor_cfg cfg)
Here is the call graph for this function:

◆ xdpe12284c_read()

uint8_t xdpe12284c_read ( sensor_cfg cfg,
int *  reading 
)
Here is the call graph for this function: