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.
Dependents: B-SMART_V15_release
Fork of DS1820 by
Revision 14:4760669f5f5e, committed 2016-01-10
- Comitter:
- SomeRandomBloke
- Date:
- Sun Jan 10 22:35:20 2016 +0000
- Parent:
- 13:51a5011dc0ad
- Commit message:
- Updates to expose address
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 |
--- a/DS1820.cpp Mon Mar 09 20:41:08 2015 +0000
+++ b/DS1820.cpp Sun Jan 10 22:35:20 2016 +0000
@@ -31,6 +31,10 @@
}
}
+char *DS1820::getAddress() {
+ return _ROM;
+}
+
bool DS1820::onewire_reset(DigitalInOut *pin) {
// This will return false if no devices are present on the data bus
--- a/DS1820.h Mon Mar 09 20:41:08 2015 +0000
+++ b/DS1820.h Sun Jan 10 22:35:20 2016 +0000
@@ -105,8 +105,11 @@
* @param a number between 9 and 12 to specify resolution
* @returns true if successful
*/
- bool setResolution(unsigned int resolution);
-
+ bool setResolution(unsigned int resolution);
+
+ char *getAddress();
+
+ static LinkedList<node> probes;
private:
bool _parasite_power;
bool _power_mosfet;
@@ -134,7 +137,7 @@
char _ROM[8];
char RAM[9];
- static LinkedList<node> probes;
+// static LinkedList<node> probes;
};
