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.

Dependencies:   LinkedList

Dependents:   STM32F103C8T6_DS18B20 stm32f103c8t6-ds18b20

Fork of DS1820 by Erik -

Revision:
11:1a3c3002b50c
Parent:
7:58b61681818f
Child:
16:d490e11c466d
--- a/DS1820.h	Fri Jan 30 11:07:10 2015 +0000
+++ b/DS1820.h	Mon Feb 16 16:53:11 2015 +0000
@@ -112,7 +112,7 @@
     bool _power_mosfet;
     bool _power_polarity;
     
-    static char CRC_byte (char CRC, char byte );
+    static char CRC_byte(char _CRC, char byte );
     static bool onewire_reset(DigitalInOut *pin);
     void match_ROM();
     void skip_ROM();