OpenBIC
OpenSource Bridge-IC
|
#include "hal_i2c.h"
#include "pmbus.h"
#include "sensor.h"
#include <logging/log.h>
#include <stdio.h>
#include <string.h>
Macros | |
#define | REG_PWR_MT_CFG 0xD4 |
#define | ADM1278_EIN_ROLLOVER_CNT_MAX 0x10000 |
#define | ADM1278_EIN_SAMPLE_CNT_MAX 0x1000000 |
#define | ADM1278_EIN_ENERGY_CNT_MAX 0x800000 |
Functions | |
LOG_MODULE_REGISTER (dev_adm1278) | |
int | adm1278_read_ein_ext (float rsense, float *val, sensor_cfg *cfg) |
uint8_t | adm1278_read (sensor_cfg *cfg, int *reading) |
uint8_t | adm1278_init (sensor_cfg *cfg) |
#define ADM1278_EIN_ENERGY_CNT_MAX 0x800000 |
#define ADM1278_EIN_ROLLOVER_CNT_MAX 0x10000 |
#define ADM1278_EIN_SAMPLE_CNT_MAX 0x1000000 |
#define REG_PWR_MT_CFG 0xD4 |
uint8_t adm1278_init | ( | sensor_cfg * | cfg | ) |
uint8_t adm1278_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
int adm1278_read_ein_ext | ( | float | rsense, |
float * | val, | ||
sensor_cfg * | cfg | ||
) |
LOG_MODULE_REGISTER | ( | dev_adm1278 | ) |