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 DS1820 by
Diff: DS1820.cpp
- Revision:
- 9:3821ca0b7f14
- Parent:
- 8:d87e11e8d012
- Child:
- 10:d297ce9ce422
diff -r d87e11e8d012 -r 3821ca0b7f14 DS1820.cpp
--- a/DS1820.cpp Tue Jul 08 18:55:54 2014 +0000
+++ b/DS1820.cpp Thu Jan 29 19:27:32 2015 +0000
@@ -6,8 +6,8 @@
DS1820::DS1820 (PinName data_pin, PinName power_pin, bool power_polarity) : _datapin(data_pin), _parasitepin(power_pin) {
int byte_counter;
_power_polarity = power_polarity;
- if (power_pin != NC)
- _power_mosfet = true;
+
+ _power_mosfet = power_pin != NC;
for(byte_counter=0;byte_counter<9;byte_counter++)
RAM[byte_counter] = 0x00;
