Dallas' 1-Wire bus protocol library
Dependents: DS1825 DISCO-F746-Dessiccateur-V1 watersenor_and_temp_code DS1820 ... more
Diff: OneWire.h
- Revision:
- 17:bbe8bf32e8bc
- Parent:
- 16:4c3edd30ad6e
--- a/OneWire.h Mon Dec 28 21:13:05 2020 +0000 +++ b/OneWire.h Tue Dec 29 16:06:46 2020 +0000 @@ -5,18 +5,11 @@ #include <mbed.h> #include "SerialBase.h" -#if defined(TARGET_STM) - #define MODE() _gpio->output(); \ - _gpio->mode(OpenDrain) - #define OUTPUT() // configured as output in the constructor and stays like that forever -#else - #define MODE() _gpio->mode(PullUp) - #define OUTPUT() _gpio->output() -#endif - -#define INPUT() _gpio->input() -#define READ() _gpio->read() -#define WRITE(x) _gpio->write(x) +#define MODE() _gpio->mode(PullUp) +#define INPUT() _gpio->input() +#define OUTPUT() _gpio->output() +#define READ() _gpio->read() +#define WRITE(x) _gpio->write(x) #ifdef TARGET_NORDIC //NORDIC targets (NRF) use software delays since their ticker uses a 32kHz clock @@ -197,4 +190,6 @@ #endif }; -#endif \ No newline at end of file +#endif + +