A simple library for reading data from a DHT22 sensor

Fork of lib_dht22 by Simon Cooksey

Files at this revision

API Documentation at this revision

Comitter:
co657_jnp8
Date:
Wed Nov 02 16:29:53 2016 +0000
Parent:
1:10ec58346011
Commit message:
Initial commit;

Changed in this revision

dht22.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/dht22.cpp	Wed Jan 06 15:36:07 2016 +0000
+++ b/dht22.cpp	Wed Nov 02 16:29:53 2016 +0000
@@ -19,6 +19,7 @@
  */
 int DHT22::wait_for_edge(edge_type_t type)
 {
+    //__disable_irq ();
     dht22_s.input();
 
     // Timing is done by increasing this number, as the Timer class appears to
@@ -31,6 +32,7 @@
 
     // wait for the edge to transition properly
     wait_us(2);
+    //__enable_irq ();
     return time;
 }
 
@@ -39,11 +41,13 @@
  */
 void DHT22::send_start()
 {
+    //__disable_irq ();
     dht22_s.output();
     dht22_s = 0;
     wait_us(DHT22_START_BIT_TIME);
     dht22_s = 1;
     dht22_s.input();
+    //__enable_irq ();
 }
 
 /*