OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <string.h>
#include <logging/log.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include "adm1272.h"
#include <sys/util.h>
Macros | |
#define | REG_PWR_MONITOR_CFG 0xD4 |
#define | ADM1272_EIN_ROLLOVER_CNT_MAX 0x100 |
#define | ADM1272_EIN_SAMPLE_CNT_MAX 0x1000000 |
#define | ADM1272_EIN_ENERGY_CNT_MAX 0x8000 |
#define | OPERATION_REGISTER 0x01; |
Functions | |
LOG_MODULE_REGISTER (dev_adm1272) | |
bool | enable_adm1272_hsc (uint8_t bus, uint8_t addr, bool enable_flag) |
uint8_t | adm1272_read (sensor_cfg *cfg, int *reading) |
uint8_t | adm1272_init (sensor_cfg *cfg) |
#define ADM1272_EIN_ENERGY_CNT_MAX 0x8000 |
#define ADM1272_EIN_ROLLOVER_CNT_MAX 0x100 |
#define ADM1272_EIN_SAMPLE_CNT_MAX 0x1000000 |
#define OPERATION_REGISTER 0x01; |
#define REG_PWR_MONITOR_CFG 0xD4 |
uint8_t adm1272_init | ( | sensor_cfg * | cfg | ) |
uint8_t adm1272_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
bool enable_adm1272_hsc | ( | uint8_t | bus, |
uint8_t | addr, | ||
bool | enable_flag | ||
) |
LOG_MODULE_REGISTER | ( | dev_adm1272 | ) |