Rev Author Line No. Line
2843 kaklik 1 /*
2 * Initialize.
3 */
4 void sht11_init(void);
5  
6  
7 /*
8 * Start measurement (humidity or temperature).
9 * Return "device found".
10 * Afterwards poll sht11_ready.
11 */
12 uint8_t sht11_start_temp(void);
13 uint8_t sht11_start_humid(void);
14  
15 /*
16 * Return 0 unless measurement completed.
17 */
18 uint8_t sht11_ready(void);
19  
20 /*
21 * Return result of measurement.
22 * H: 100*%RH (0..10000)
23 * T: 100*T
24 * Return -32xxx on failure.
25 */
26 int16_t sht11_result_temp(void);
27 int16_t sht11_result_humid(void);
28  
29 #define SHT11_UNAVAIL -32768
30 #define SHT11_CRC_FAIL -32767
31 #define sht11_valid(v) ((v) > -32000)