zzz

Revision:
11:bc8ed7280966
Parent:
10:c89b9ad6097c
Child:
12:27a1b359b95c
--- a/OneWire.h	Sun Jan 27 14:11:28 2019 +0000
+++ b/OneWire.h	Sun Jan 27 18:01:19 2019 +0000
@@ -5,11 +5,11 @@
 #include <mbed.h>
 
 #if defined(TARGET_STM)
-    #define MODE(x)      output(); \
+    #define MODE()       output(); \
                          mode(OpenDrain)
     #define INPUT()     (*gpio.reg_set = gpio.mask) // write 1 to open drain
-    #define OUTPUT()    // configured as output in the constructor and stays output forever
-    #define READ()      ((*gpio.reg_in & gpio.mask) ? 1 : 0)
+    #define OUTPUT()    // configured as output in the constructor and stays like that forever
+    #define READ()      ((*gpio.reg_in & gpio.mask) != 0)
     #define WRITE(x)    write(x)
 #else
     #define MODE()      mode(PullUp)