OpenBIC
OpenSource Bridge-IC
adm1278.c File Reference
#include "hal_i2c.h"
#include "pmbus.h"
#include "sensor.h"
#include <logging/log.h>
#include <stdio.h>
#include <string.h>
Include dependency graph for adm1278.c:

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)
 

Macro Definition Documentation

◆ ADM1278_EIN_ENERGY_CNT_MAX

#define ADM1278_EIN_ENERGY_CNT_MAX   0x800000

◆ ADM1278_EIN_ROLLOVER_CNT_MAX

#define ADM1278_EIN_ROLLOVER_CNT_MAX   0x10000

◆ ADM1278_EIN_SAMPLE_CNT_MAX

#define ADM1278_EIN_SAMPLE_CNT_MAX   0x1000000

◆ REG_PWR_MT_CFG

#define REG_PWR_MT_CFG   0xD4

Function Documentation

◆ adm1278_init()

uint8_t adm1278_init ( sensor_cfg cfg)
Here is the call graph for this function:

◆ adm1278_read()

uint8_t adm1278_read ( sensor_cfg cfg,
int *  reading 
)
Here is the call graph for this function:

◆ adm1278_read_ein_ext()

int adm1278_read_ein_ext ( float  rsense,
float *  val,
sensor_cfg cfg 
)
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( dev_adm1278  )