Rev Author Line No. Line
3275 kaklik 1 float LTS01_get_temp()
2 {
3 unsigned int8 MSB;
4 unsigned int8 LSB;
5 signed int16 data;
6  
7 i2c_start();
8 I2C_Write(LTS01A_address);
9 I2C_write(0x00);
10 i2c_stop();
11 i2c_start();
12 I2C_Write(LTS01A_address+1);
13 MSB=i2c_read(1);
14 LSB=i2c_read(0);
15 i2c_stop();
16  
17 data = MAKE16(MSB,LSB);
18  
19 return (data * 0.00390625 );
20  
21 }