To add bugfixes
Fork of DS1820 by
Revision 16:4b757a697e95, committed 2018-03-05
- Comitter:
- Marten Lootsma
- Date:
- Mon Mar 05 16:54:08 2018 +0100
- Parent:
- 15:236eb8f8e73a
- Commit message:
- Made consequent use of INPUT/OUTPUT macro's to make it work for STM
Changed in this revision
DS1820.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 236eb8f8e73a -r 4b757a697e95 DS1820.cpp --- a/DS1820.cpp Sat Mar 11 20:35:59 2017 +0000 +++ b/DS1820.cpp Mon Mar 05 16:54:08 2018 +0100 @@ -51,9 +51,9 @@ if (!unassignedProbe(&_datapin, _ROM)) error("No unassigned DS1820 found!\n"); else { - _datapin.input(); - probes.append(this); - _parasite_power = !read_power_supply(); + ONEWIRE_INPUT((&_datapin)); + probes.append(this); + _parasite_power = !read_power_supply(); } } @@ -328,10 +328,10 @@ _parasitepin = !_power_polarity; delay_time = 0; } else { - _datapin.output(); + ONEWIRE_OUTPUT((&_datapin)); _datapin.write(1); wait_ms(delay_time); - _datapin.input(); + ONEWIRE_INPUT((&_datapin)); } } else { if (wait) {