|
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>
Classes | |
| struct | LTC4286_MBR_TABLE |
Macros | |
| #define | LTC4286_MFR_CONFIG1 0xF2 |
| #define | I2C_DATA_SIZE 5 |
Enumerations | |
| enum | VRANGE_SELECT { VRANGE_SELECT_25_6_V = 0x0 , VRANGE_SELECT_102_4_V = 0x1 , BOTH = 0x2 } |
| enum | SENSOR_TYPE { VOLTAGE = 0x0 , CURRENT = 0x1 , POWER = 0x2 , TEMPERATURE = 0x3 } |
Functions | |
| LOG_MODULE_REGISTER (ltc4286) | |
| int | ltc4286_convert_real_value (uint8_t type, uint8_t vrange_select, float rsense, uint16_t tmp_val, double *val) |
| int | ltc4286_read_iin (sensor_cfg *cfg, double *val) |
| int | ltc4286_read_pout (sensor_cfg *cfg, double *val) |
| uint8_t | ltc4286_read (sensor_cfg *cfg, int *reading) |
| uint8_t | ltc4286_init (sensor_cfg *cfg) |
Variables | |
| struct LTC4286_MBR_TABLE | ltc4286_mbr_table [] |
| #define I2C_DATA_SIZE 5 |
| #define LTC4286_MFR_CONFIG1 0xF2 |
| enum SENSOR_TYPE |
| enum VRANGE_SELECT |
| LOG_MODULE_REGISTER | ( | ltc4286 | ) |
| int ltc4286_convert_real_value | ( | uint8_t | type, |
| uint8_t | vrange_select, | ||
| float | rsense, | ||
| uint16_t | tmp_val, | ||
| double * | val | ||
| ) |
| uint8_t ltc4286_init | ( | sensor_cfg * | cfg | ) |

| uint8_t ltc4286_read | ( | sensor_cfg * | cfg, |
| int * | reading | ||
| ) |

| int ltc4286_read_iin | ( | sensor_cfg * | cfg, |
| double * | val | ||
| ) |
| int ltc4286_read_pout | ( | sensor_cfg * | cfg, |
| double * | val | ||
| ) |
| struct LTC4286_MBR_TABLE ltc4286_mbr_table[] |