OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <logging/log.h>
#include "mpq8746.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
Classes | |
struct | mpq8746_data |
struct | mpq8746_config |
Macros | |
#define | VR_MPS_VEND_ID 0x4D5053 |
#define | MAX_CMD_LINE 720 |
#define | VR_MPS_PAGE_0 0x00 |
#define | VR_REG_STORE_USR_ALL 0x15 |
#define | VR_REG_VOUT_MODE 0x20 |
#define | VR_REG_MFR_ID 0x99 |
#define | VR_REG_MFR_CFG_ID 0xC0 |
#define | VR_REG_MFR_CFG_CODE_REV 0xC1 |
#define | VR_REG_CRC_USR 0xF8 |
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 | { VOUT_MODE_DIRECT , VOUT_MODE_VID , VOUT_MODE_LINEAR , VOUT_MODE_UNKNOWN = 0xFF } |
Functions | |
LOG_MODULE_REGISTER (mpq8746) | |
bool | mpq8746_get_fw_version (uint8_t bus, uint8_t addr, uint16_t *rev) |
bool | mpq8746_fwupdate (uint8_t bus, uint8_t addr, uint8_t *img_buff, uint32_t img_size) |
uint8_t | mpq8746_read (sensor_cfg *cfg, int *reading) |
uint8_t | mpq8746_init (sensor_cfg *cfg) |
Variables | |
uint8_t | vr_vout_mode = VOUT_MODE_UNKNOWN |
#define MAX_CMD_LINE 720 |
#define VR_MPS_PAGE_0 0x00 |
#define VR_MPS_VEND_ID 0x4D5053 |
#define VR_REG_CRC_USR 0xF8 |
#define VR_REG_MFR_CFG_CODE_REV 0xC1 |
#define VR_REG_MFR_CFG_ID 0xC0 |
#define VR_REG_MFR_ID 0x99 |
#define VR_REG_STORE_USR_ALL 0x15 |
#define VR_REG_VOUT_MODE 0x20 |
anonymous enum |
LOG_MODULE_REGISTER | ( | mpq8746 | ) |
bool mpq8746_fwupdate | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint8_t * | img_buff, | ||
uint32_t | img_size | ||
) |
bool mpq8746_get_fw_version | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint16_t * | rev | ||
) |
uint8_t mpq8746_init | ( | sensor_cfg * | cfg | ) |
uint8_t mpq8746_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
uint8_t vr_vout_mode = VOUT_MODE_UNKNOWN |