#include "bexus_temperature_i2c.h" uint8_t i2c_temp[]={0x49,0x00,0x01}; struct Dataset *data_i2c; uint8_t m_buff2[3]; void Temperature_I2c_Init() { for(int i=0; itemperature_i2c_raw = m_buff2[0]<<8 | m_buff2[1]; } else return HAL_ERROR; if(data_i2c->temperature_i2c_raw<32768){ //Temperaturberechnung data_i2c->temperature_i2c= data_i2c->temperature_i2c_raw*0.0078125;//wenn größer 0°C }else{ data_i2c->temperature_i2c=(32768- data_i2c->temperature_i2c_raw)*0.0078125; } return HAL_OK; }