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
Revision 9:3821ca0b7f14, committed 2015-01-29
- Comitter:
- florian
- Date:
- Thu Jan 29 19:27:32 2015 +0000
- Parent:
- 8:d87e11e8d012
- Child:
- 10:d297ce9ce422
- Commit message:
- suppress a bug uninitialized variable
Changed in this revision
| DS1820.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
