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

Macros

#define VOLTAGE_SELECT_BIT   (1 << 2)
 
#define ADC_16BIT_MODE_BIT   (1 << 0)
 
#define ADC_16BIT_MODE_DELAY_MS   1100
 
#define ADC_12BIT_MODE_DELAY_MS   100
 

Functions

 LOG_MODULE_REGISTER (plat_hook)
 
bool pre_ltc4282_read (sensor_cfg *cfg, void *args)
 

Variables

adc_asd_init_arg adc_asd_init_args [] = { [0] = { .is_init = false } }
 
adm1278_init_arg adm1278_init_args []
 
ltc4282_init_arg ltc4282_init_args [] = { [0] = { .is_init = false, .r_sense_mohm = 0.1 } }
 
ltc4282_pre_proc_arg ltc4282_pre_read_args []
 

Macro Definition Documentation

◆ ADC_12BIT_MODE_DELAY_MS

#define ADC_12BIT_MODE_DELAY_MS   100

◆ ADC_16BIT_MODE_BIT

#define ADC_16BIT_MODE_BIT   (1 << 0)

◆ ADC_16BIT_MODE_DELAY_MS

#define ADC_16BIT_MODE_DELAY_MS   1100

◆ VOLTAGE_SELECT_BIT

#define VOLTAGE_SELECT_BIT   (1 << 2)

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_hook  )

◆ pre_ltc4282_read()

bool pre_ltc4282_read ( sensor_cfg cfg,
void *  args 
)
Here is the call graph for this function:

Variable Documentation

◆ adc_asd_init_args

adc_asd_init_arg adc_asd_init_args[] = { [0] = { .is_init = false } }

◆ adm1278_init_args

adm1278_init_arg adm1278_init_args[]
Initial value:
= {
[0] = { .is_init = false, .config = { 0x3F1C }, .r_sense = 0.25 }
}

◆ ltc4282_init_args

ltc4282_init_arg ltc4282_init_args[] = { [0] = { .is_init = false, .r_sense_mohm = 0.1 } }

◆ ltc4282_pre_read_args

ltc4282_pre_proc_arg ltc4282_pre_read_args[]
Initial value:
= {
[0] = { "VIN" },
[1] = { "VOUT" },
}