Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of lib_dht22 by
Revision 2:02cbaab7c6cd, committed 2016-11-02
- Comitter:
- co657_jnp8
- Date:
- Wed Nov 02 16:29:53 2016 +0000
- Parent:
- 1:10ec58346011
- Child:
- 3:40df3c72813f
- 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 ();
}
/*
