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 | MP2891_READ_TEMPERATURE_1_RESOLUTION 1 |
#define | MP2891_READ_VIN_RESOLUTION 0.125 |
#define | MP2891_READ_VOUT_RESOLUTION 0.0625 |
#define | MP2891_READ_IOUT_RESOLUTION 0.25 |
#define | MP2891_READ_POUT_RESOLUTION 1 |
#define | MP2891_READ_TEMPERATURE_1_MASK GENMASK(7, 0) |
#define | MP2891_READ_VIN_MASK GENMASK(9, 0) |
#define | MP2891_READ_VOUT_MASK GENMASK(8, 0) |
#define | MP2891_READ_IOUT_MASK GENMASK(9, 0) |
#define | MP2891_READ_POUT_MASK GENMASK(10, 0) |
Functions | |
LOG_MODULE_REGISTER (mpc12109) | |
uint8_t | mpc12109_read (sensor_cfg *cfg, int *reading) |
uint8_t | mpc12109_init (sensor_cfg *cfg) |
#define MP2891_READ_IOUT_MASK GENMASK(9, 0) |
#define MP2891_READ_IOUT_RESOLUTION 0.25 |
#define MP2891_READ_POUT_MASK GENMASK(10, 0) |
#define MP2891_READ_POUT_RESOLUTION 1 |
#define MP2891_READ_TEMPERATURE_1_MASK GENMASK(7, 0) |
#define MP2891_READ_TEMPERATURE_1_RESOLUTION 1 |
#define MP2891_READ_VIN_MASK GENMASK(9, 0) |
#define MP2891_READ_VIN_RESOLUTION 0.125 |
#define MP2891_READ_VOUT_MASK GENMASK(8, 0) |
#define MP2891_READ_VOUT_RESOLUTION 0.0625 |
LOG_MODULE_REGISTER | ( | mpc12109 | ) |
uint8_t mpc12109_init | ( | sensor_cfg * | cfg | ) |
uint8_t mpc12109_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |