OpenBIC
OpenSource Bridge-IC
plat_class.c File Reference
#include <stdlib.h>
#include <logging/log.h>
#include "libutil.h"
#include "plat_class.h"
Include dependency graph for plat_class.c:

Enumerations

enum  ADC_REF_VOL_SELECTION {
  REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 ,
  REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 ,
  REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 ,
  REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 ,
  REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40 , REF_VOL_2_5V = 0x0 , REF_VOL_1_2V = 0x40
}
 

Functions

 LOG_MODULE_REGISTER (plat_class)
 
bool get_adc_voltage (int channel, float *voltage)
 

Variables

struct ADC_INFO adc_info [NUMBER_OF_ADC_CHANNEL]
 

Enumeration Type Documentation

◆ ADC_REF_VOL_SELECTION

Enumerator
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 
REF_VOL_2_5V 
REF_VOL_1_2V 

Function Documentation

◆ get_adc_voltage()

bool get_adc_voltage ( int  channel,
float *  voltage 
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_class  )

Variable Documentation

◆ adc_info

Initial value:
= {
{ 0x10, 0 }, { 0x10, 16 }, { 0x14, 0 }, { 0x14, 16 }, { 0x18, 0 }, { 0x18, 16 },
{ 0x1C, 0 }, { 0x1C, 16 }, { 0x110, 0 }, { 0x110, 16 }, { 0x114, 0 }, { 0x114, 16 },
{ 0x118, 0 }, { 0x118, 16 }, { 0x11C, 0 }, { 0x11C, 16 }
}