A cut-down version of https://os.mbed.com/users/Sissors/code/DS1820/ tweaked for use with the STM32F103. It is all generic Mbed operations though, so should be usable anywhere. Non-essential functions have been removed, as this is intended for use within a tutorial.
Dependents: STM32F103C8T6_DS18B20 stm32f103c8t6-ds18b20
Fork of DS1820 by
Diff: DS1820.h
- Revision:
- 6:abfdd851218a
- Parent:
- 5:2cd4928e8147
- Child:
- 7:58b61681818f
--- a/DS1820.h Mon Feb 24 21:23:14 2014 +0000 +++ b/DS1820.h Wed Apr 02 19:10:34 2014 +0000 @@ -85,7 +85,7 @@ * to all devices on the 1-Wire bus. * @returns milliseconds untill conversion will complete. */ - int convertTemperature(bool wait, devices device=this_device); + int convertTemperature(bool wait, devices device=all_devices); /** This function will return the probe temperature. Approximately 10ms per * probe to read its RAM, do CRC check and convert temperature on the LPC1768.