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