Cause interrupts to be reenabled if a timeout occurs while waiting for the sensor.

This commit is contained in:
Zirientis
2015-07-01 17:53:53 -07:00
parent a1393fc0ff
commit a2208eb813
2 changed files with 58 additions and 46 deletions

11
DHT.h
View File

@ -57,4 +57,15 @@ class DHT {
};
class InterruptLock {
public:
InterruptLock() {
noInterrupts();
}
~InterruptLock() {
interrupts();
}
};
#endif