OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <logging/log.h>
#include "sensor.h"
#include "pmbus.h"
#include "hal_i2c.h"
#include "ina233.h"
Macros | |
#define | INA233_CALIBRATION_OFFSET 0xD4 |
#define | INA233_MFR_ADC_CONFIG 0xD0 |
#define | INA233_MFR_DEVICE_CONFIG 0xD5 |
#define | INA233_MFR_ALERT_MASK 0xD2 |
#define | INA233_IOUT_OC_WARN_LIMIT_REG 0x4A |
#define | INA233_VIN_OV_WARN_LIMIT_REG 0x57 |
#define | INA233_VIN_UV_WARN_LIMIT_REG 0x58 |
#define | INA233_PIN_OP_WARN_LIMIT_REG 0x6B |
#define | INA233_EIN_POWER_CNT_MAX 0x10000 |
Functions | |
LOG_MODULE_REGISTER (dev_ina233) | |
int | ina233_read_ein (sensor_cfg *cfg, int16_t *val) |
uint8_t | ina233_read (sensor_cfg *cfg, int *reading) |
uint8_t | ina233_init (sensor_cfg *cfg) |
Variables | |
uint8_t | INA233_DEVICE_ID [3] = { 0x02, 0x54, 0x49 } |
#define INA233_CALIBRATION_OFFSET 0xD4 |
#define INA233_EIN_POWER_CNT_MAX 0x10000 |
#define INA233_IOUT_OC_WARN_LIMIT_REG 0x4A |
#define INA233_MFR_ADC_CONFIG 0xD0 |
#define INA233_MFR_ALERT_MASK 0xD2 |
#define INA233_MFR_DEVICE_CONFIG 0xD5 |
#define INA233_PIN_OP_WARN_LIMIT_REG 0x6B |
#define INA233_VIN_OV_WARN_LIMIT_REG 0x57 |
#define INA233_VIN_UV_WARN_LIMIT_REG 0x58 |
uint8_t ina233_init | ( | sensor_cfg * | cfg | ) |
uint8_t ina233_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
int ina233_read_ein | ( | sensor_cfg * | cfg, |
int16_t * | val | ||
) |
LOG_MODULE_REGISTER | ( | dev_ina233 | ) |
uint8_t INA233_DEVICE_ID[3] = { 0x02, 0x54, 0x49 } |