#include "bexus_i2c_cis.h" /**----------------variables---------------------------*/ uint8_t i2c_adresse_druck_cis[] = {0x78,0x72,0x02};//Adresse vom Chip,Startbefehl,Ram uint8_t buff_druck_cis[4];//Buffer für reingehende Byte-Kette struct Dataset *data_cis; /**-----------------------------------------------------*/ /**------------------functions--------------------------*/ void Pressure_Cis_Init(){ for(int i=0;ipressure_cis_raw = (buff_druck_cis[0]<<8)+ buff_druck_cis[1]; //Rohdaten-hälften von 2x8Bit zu 1x16Bit konvertieren data_cis->temperature_cis_raw = (buff_druck_cis[2]<<8)+ buff_druck_cis[3]; data_cis->pressure_cis = ((data_cis->pressure_cis_raw-2097.)/23592)*100000; // data_cis->temperature_cis=(data_cis->temperature_cis_raw-14940.5)/256.89+10; data_cis->temperature_cis=(data_cis->temperature_cis_raw-25689./2+2096)/256.89+10; return HAL_OK; } /**-----------------------------------------------------*/