OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "libutil.h"
#include "pmbus.h"
#include <logging/log.h>
Macros | |
#define | I2C_DATA_SIZE 5 |
#define | MP5990_OCW_SC_REF_OFFSET 0xC5 |
#define | MP5990_EIN_ROLLOVER_CNT_MAX 0x100 |
#define | MP5990_EIN_SAMPLE_CNT_MAX 0x1000000 |
#define | MP5990_EIN_ENERGY_CNT_MAX 0x8000 |
Functions | |
LOG_MODULE_REGISTER (mp5990) | |
int | mp5990_read_ein (double *val, sensor_cfg *cfg) |
uint8_t | mp5990_read (sensor_cfg *cfg, int *reading) |
uint8_t | mp5990_init (sensor_cfg *cfg) |
#define I2C_DATA_SIZE 5 |
#define MP5990_EIN_ENERGY_CNT_MAX 0x8000 |
#define MP5990_EIN_ROLLOVER_CNT_MAX 0x100 |
#define MP5990_EIN_SAMPLE_CNT_MAX 0x1000000 |
#define MP5990_OCW_SC_REF_OFFSET 0xC5 |
LOG_MODULE_REGISTER | ( | mp5990 | ) |
uint8_t mp5990_init | ( | sensor_cfg * | cfg | ) |
uint8_t mp5990_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
int mp5990_read_ein | ( | double * | val, |
sensor_cfg * | cfg | ||
) |