OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <string.h>
#include <logging/log.h>
#include "libutil.h"
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "util_pmbus.h"
Macros | |
#define | DAC_2P5MV_EN_BIT BIT(13) |
#define | MFR_VID_RES_MASK GENMASK(15, 14) |
#define | IOUT_SCALE_MASK GENMASK(2, 0) |
#define | IOUT_MASK GENMASK(10, 0) |
#define | MFR_SVI3_IOUT_RPT 0x65 |
#define | MFR_VOUT_LOOP_CTRL 0xBD |
#define | VR_MPS_PAGE_1 0x01 |
#define | VR_REG_EXPECTED_USER_CRC 0xF0 |
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 } |
Functions | |
LOG_MODULE_REGISTER (mp2891) | |
bool | mp2891_get_fw_version (uint8_t bus, uint8_t addr, uint32_t *rev) |
float | mp2891_get_resolution (sensor_cfg *cfg) |
uint8_t | mp2891_read (sensor_cfg *cfg, int *reading) |
uint8_t | mp2891_init (sensor_cfg *cfg) |
#define DAC_2P5MV_EN_BIT BIT(13) |
#define IOUT_MASK GENMASK(10, 0) |
#define IOUT_SCALE_MASK GENMASK(2, 0) |
#define MFR_SVI3_IOUT_RPT 0x65 |
#define MFR_VID_RES_MASK GENMASK(15, 14) |
#define MFR_VOUT_LOOP_CTRL 0xBD |
#define VR_MPS_PAGE_1 0x01 |
#define VR_REG_EXPECTED_USER_CRC 0xF0 |
anonymous enum |
LOG_MODULE_REGISTER | ( | mp2891 | ) |
bool mp2891_get_fw_version | ( | uint8_t | bus, |
uint8_t | addr, | ||
uint32_t * | rev | ||
) |
float mp2891_get_resolution | ( | sensor_cfg * | cfg | ) |
uint8_t mp2891_init | ( | sensor_cfg * | cfg | ) |
uint8_t mp2891_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |