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

Macros

#define ADC128_REG_CONFIG   0x00
 
#define ADC128_REG_CONFIG_ADV   0x0b
 
#define ADC128_REG_IN(nr)   (0x20 + (nr))
 
#define ADC128_VREF   2.56
 

Functions

 LOG_MODULE_REGISTER (adc128d818)
 
uint8_t adc128d818_read (sensor_cfg *cfg, int *reading)
 
uint8_t adc128d818_write (sensor_cfg *cfg, uint8_t reg, uint8_t value)
 
uint8_t adc128d818_init (sensor_cfg *cfg)
 

Macro Definition Documentation

◆ ADC128_REG_CONFIG

#define ADC128_REG_CONFIG   0x00

◆ ADC128_REG_CONFIG_ADV

#define ADC128_REG_CONFIG_ADV   0x0b

◆ ADC128_REG_IN

#define ADC128_REG_IN (   nr)    (0x20 + (nr))

◆ ADC128_VREF

#define ADC128_VREF   2.56

Function Documentation

◆ adc128d818_init()

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

◆ adc128d818_read()

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

◆ adc128d818_write()

uint8_t adc128d818_write ( sensor_cfg cfg,
uint8_t  reg,
uint8_t  value 
)
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( adc128d818  )