I2C components of OSS-EC
In this section, we will use the OSS-EC I2C component ( TI HDC1080 ) as an example.
- Block diagram of I2C components and OSS-EC software ( fig.1 )
- Application state transition of I2C components ( fig.2)
- API ( fig.3 )
- Architecture of PCMP ( fig.4 )
Blue label characters are data related to components.
Red label characters are data related to application.
Green label characters are data related to the circuit.


res.sts == iPowerOn_Reset_Fin is Normal Fin of Power ON Reset.
res.sts == iSW_Reset_Fin is Normal Fin of Software Reset.
res.sts == iMeasurement_Fin is Normal Fin of Measurement.
cmd.cnf == iREG_conf_measu is configuration of non-heater measurement.
cmd.cnf == iREG_conf_heat is configuration of heater measurement.
HDC1080.temp < iTemp_low is low temperature.
HDC1080.temp > iTemp_low is high temperature.
res.ic_reg[iRes_pos_conf] && iBTST == 0 is high battery voltage.
res.ic_reg[iRes_pos_conf] && iBTST == 1 is low battery voltage.
HDC1080.diag == iError occurs when any of the following conditions are met.
1) res.sp_dia == iError Count iError_times times in a row. // SP layer error ?
2) res.cp_dia == iError Count iError_times times in a row. // CP layer error ?
3) res.mp_dia == iError Count iError_times times in a row. // MP layer error ?
Note : If Diag==iError still occurs after several times of Software Reset, please set a State such as Sleep.

Structure name | Type | Structure members | Data meaning |
HDC1080 | float | temp | Temperature [degree Celsius] |
float | humi | Humidity [%RH] | |
unsigned short | diag | Diagnostic result | |
unsigned short | manu_id | Manufacturer ID | |
unsigned short | devi_id | Devide ID | |
unsigned long long | seri_id | Serial ID | |
cmd | unsigned short | ic | IC model number of OSS-EC |
unsigned short | cmd | Command of OSS-EC | |
reg_type* | cnf[iReg_cnf_num] | Configration register value of command | |
res | unsigned short | sts | PCMP status |
unsigned short | sp_dia | SP diagnostic result | |
unsigned short | cp_dia | CP diagnostic result | |
unsigned short | mp_dia | MP diagnostic result | |
float | phy_val[iPhy_type_num] | Sensor physical value phy_val[0] temperature [degree Celsius] phy_val[1] humidity [%RH] | |
reg_type* | ic_reg[iReg_num] | register value res.ic_reg[iRes_pos_temp] temperature res.ic_reg[iRes_pos_humi] humidity res.ic_reg[iRes_pos_conf] configuration res.ic_reg[iRes_pos_seri1] Serial ID first res.ic_reg[iRes_pos_seri2] Serial ID mid res.ic_reg[iRes_pos_seri3] Serial ID last res.ic_reg[iRes_pos_manu] Manufacturer ID res.ic_reg[iRes_pos_devi] Device ID |
reg_type : unsigned short : HDC1080 register length 16bit

