OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <logging/log.h>
#include "mp2988.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
Classes | |
struct | mp2988_data |
struct | mp2988_config |
Macros | |
#define | MP2988_DEV_ID 0x98 |
#define | VR_REG_CODE_REV 0x26 |
#define | VR_REG_DEV_ID 0x28 |
#define | VR_REG_STAT_CML 0x7E |
#define | VR_REG_FAULT_CLR 0x03 |
#define | VR_REG_STORE_USR_ALL 0x15 |
#define | VR_REG_RESTORE_USR_ALL 0x16 |
#define | VR_REG_STORE_STAT 0x00 |
#define | MAX_CMD_LINE 720 |
#define | VR_MPS_PAGE_0 0x00 |
#define | VR_MPS_PAGE_1 0x01 |
#define | VR_MPS_PAGE_2 0x02 |
#define | VR_MPS_PAGE_3 0x03 |
Enumerations | |
enum | { ATE_CONF_ID = 0 , ATE_PAGE_NUM , ATE_REG_ADDR_HEX , ATE_REG_ADDR_DEC , ATE_REG_NAME , ATE_REG_DATA_HEX , ATE_REG_DATA_DEC , ATE_COL_MAX } |
enum | { MODE_STORE_USR_ALL , MODE_RESTORE_USR_ALL } |
Functions | |
LOG_MODULE_REGISTER (mp2988) | |
bool | mp2988_get_checksum (uint8_t bus, uint8_t addr, uint16_t *crc) |
bool | mp2988_fwupdate (uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size) |
#define MAX_CMD_LINE 720 |
#define MP2988_DEV_ID 0x98 |
#define VR_MPS_PAGE_0 0x00 |
#define VR_MPS_PAGE_1 0x01 |
#define VR_MPS_PAGE_2 0x02 |
#define VR_MPS_PAGE_3 0x03 |
#define VR_REG_CODE_REV 0x26 |
#define VR_REG_DEV_ID 0x28 |
#define VR_REG_FAULT_CLR 0x03 |
#define VR_REG_RESTORE_USR_ALL 0x16 |
#define VR_REG_STAT_CML 0x7E |
#define VR_REG_STORE_STAT 0x00 |
#define VR_REG_STORE_USR_ALL 0x15 |
anonymous enum |
LOG_MODULE_REGISTER | ( | mp2988 | ) |
bool mp2988_fwupdate | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t * | img_buff, | ||
uint32_t | img_size | ||
) |
bool mp2988_get_checksum | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint16_t * | crc | ||
) |