-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththermo433_lib.h
More file actions
44 lines (31 loc) · 1.32 KB
/
thermo433_lib.h
File metadata and controls
44 lines (31 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _THERMO433_LIB_H_
#define _THERMO433_LIB_H_
/* uncomment/define if timing statistic is required */
#define THERMO433_INCLUDE_TIMING_STATS
/* Remote thermometer types */
#define THERMO433_DEVICE_HYUWSSENZOR77TH 0 /* Hyundai WS Senzor 77 TH */
/* Pulse types from classifyPulse() function*/
#define THERMO433_PULSE_TYPE_SYNC 0
#define THERMO433_PULSE_TYPE_HIGH 1
#define THERMO433_PULSE_TYPE_LOW_SHORT 2
#define THERMO433_PULSE_TYPE_LOW_LONG 3
#define THERMO433_PULSE_TYPE_UNKNOWN -1
/* Temperature trend (direction of change) */
#define THERMO433_TEMP_TREND_DOWN 2
#define THERMO433_TEMP_TREND_UP 1
#define THERMO433_TEMP_TREND_STABLE 0
#define THERMO433_TEMP_TREND_INVALID -1
int Thermo433_init(int tx_gpio, int rx_gpio, int type);
unsigned long long Thermo433_getAnyCode(void);
unsigned long long Thermo433_getCode(void);
unsigned long long Thermo433_waitAnyCode(void);
unsigned long long Thermo433_waitCode(void);
int Thermo433_decodeValues(unsigned long long val, int *ch, int *bat,
int *temp, int *humid, int *tdir);
void Thermo433_waitValues(int *ch, int *bat, int *temp, int *humid, int *tdir);
int Thermo433_classifyPulse(unsigned long microseconds);
#ifdef THERMO433_INCLUDE_TIMING_STATS
/* Get timing data for statistics */
int Thermo433_getTimingStats(unsigned long *timesync, unsigned long tpbuf[]);
#endif
#endif