-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patham2302.pxd
38 lines (28 loc) · 810 Bytes
/
am2302.pxd
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
from libc.stdint cimport uint8_t, uint16_t, uint32_t
from libcpp cimport bool
cdef extern from 'array':
cdef cppclass array:
uint32_t& operator[](uint32_t)
cdef extern from 'bitset':
cdef cppclass bitset:
unsigned size()
unsigned count()
bool test(unsigned)
cdef extern from 'wiringPi.h':
void wiringPiSetup()
cdef extern from 'am2302_py.hpp':
cdef cppclass StreamReader:
int pin
bitset bits
void run()
void fillBits()
void print()
bool valid()
uint16_t temperature(const bitset &)
uint16_t humidity(const bitset &)
uint8_t parity(const bitset &)
array timingsStart
array timingsHigh
array timingsLow
bitset missingBits()
bool tryCorrect()