teste de publish

Dependencies:   LinkedList

Fork of DS1820 by Erik -

Files at this revision

API Documentation at this revision

Comitter:
brunofgc
Date:
Thu Jun 07 16:19:27 2018 +0000
Parent:
12:196e9e54b033
Commit message:
Corrigido os delays para osDelay (a fim de liberar para outras threads)

Changed in this revision

DS1820.cpp Show annotated file Show diff for this revision Revisions of this file
DS1820.h Show annotated file Show diff for this revision Revisions of this file
diff -r 196e9e54b033 -r 01fb493e5d2f DS1820.cpp
--- a/DS1820.cpp	Thu Feb 26 22:20:24 2015 +0000
+++ b/DS1820.cpp	Thu Jun 07 16:19:27 2018 +0000
@@ -286,18 +286,18 @@
     if (_parasite_power) {
         if (_power_mosfet) {
             _parasitepin = _power_polarity;     // Parasite power strong pullup
-            wait_ms(delay_time);
+            osDelay(delay_time);
             _parasitepin = !_power_polarity;
             delay_time = 0;
         } else {
             _datapin.output();
             _datapin.write(1);
-            wait_ms(delay_time);
+            osDelay(delay_time);
             _datapin.input();
         }
     } else {
         if (wait) {
-            wait_ms(delay_time);
+            osDelay(delay_time);
             delay_time = 0;
         }
     }
diff -r 196e9e54b033 -r 01fb493e5d2f DS1820.h
--- a/DS1820.h	Thu Feb 26 22:20:24 2015 +0000
+++ b/DS1820.h	Thu Jun 07 16:19:27 2018 +0000
@@ -25,6 +25,7 @@
 
 #include "mbed.h"
 #include "LinkedList.h"
+#include "cmsis_os.h"   //Nucleo do Real Time Operational System
 
 #define FAMILY_CODE _ROM[0]
 #define FAMILY_CODE_DS1820 0x10