![](/media/cache/profiles/a7bf3f5462cc82062e41b3a2262e1a21.50x50_q85.jpg)
1-Wire implementation, using DS2480B controller interfaced with serial port, working example to read DS18B20, based on work already in progress / Dallas - Public domain code
Headers/owTemp.h@0:1193dbfe28e2, 2011-03-24 (annotated)
- Committer:
- pwheels
- Date:
- Thu Mar 24 17:21:29 2011 +0000
- Revision:
- 0:1193dbfe28e2
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
pwheels | 0:1193dbfe28e2 | 1 | |
pwheels | 0:1193dbfe28e2 | 2 | |
pwheels | 0:1193dbfe28e2 | 3 | |
pwheels | 0:1193dbfe28e2 | 4 | #ifndef MBED_1WIRETEMP_H |
pwheels | 0:1193dbfe28e2 | 5 | #define MBED_1WIRETEMP_H |
pwheels | 0:1193dbfe28e2 | 6 | |
pwheels | 0:1193dbfe28e2 | 7 | |
pwheels | 0:1193dbfe28e2 | 8 | |
pwheels | 0:1193dbfe28e2 | 9 | /** An interface for the Dallas 1-wire temperature buttons, the DS1920 |
pwheels | 0:1193dbfe28e2 | 10 | * |
pwheels | 0:1193dbfe28e2 | 11 | * @code |
pwheels | 0:1193dbfe28e2 | 12 | * #include "mbed.h" |
pwheels | 0:1193dbfe28e2 | 13 | * #include "1-wiretemp.h" |
pwheels | 0:1193dbfe28e2 | 14 | * |
pwheels | 0:1193dbfe28e2 | 15 | * // TODO NokiaLCD lcd(p5, p7, p8, p9); // mosi, sclk, cs, rst |
pwheels | 0:1193dbfe28e2 | 16 | * |
pwheels | 0:1193dbfe28e2 | 17 | * int main() { |
pwheels | 0:1193dbfe28e2 | 18 | * lcd.printf("Hello World!"); |
pwheels | 0:1193dbfe28e2 | 19 | * } |
pwheels | 0:1193dbfe28e2 | 20 | * @endcode |
pwheels | 0:1193dbfe28e2 | 21 | */ |
pwheels | 0:1193dbfe28e2 | 22 | class owTemp { |
pwheels | 0:1193dbfe28e2 | 23 | |
pwheels | 0:1193dbfe28e2 | 24 | |
pwheels | 0:1193dbfe28e2 | 25 | |
pwheels | 0:1193dbfe28e2 | 26 | public: |
pwheels | 0:1193dbfe28e2 | 27 | |
pwheels | 0:1193dbfe28e2 | 28 | owTemp ( ); |
pwheels | 0:1193dbfe28e2 | 29 | |
pwheels | 0:1193dbfe28e2 | 30 | |
pwheels | 0:1193dbfe28e2 | 31 | void Maingettemp( void ); |
pwheels | 0:1193dbfe28e2 | 32 | |
pwheels | 0:1193dbfe28e2 | 33 | |
pwheels | 0:1193dbfe28e2 | 34 | protected: |
pwheels | 0:1193dbfe28e2 | 35 | |
pwheels | 0:1193dbfe28e2 | 36 | private: |
pwheels | 0:1193dbfe28e2 | 37 | |
pwheels | 0:1193dbfe28e2 | 38 | |
pwheels | 0:1193dbfe28e2 | 39 | }; |
pwheels | 0:1193dbfe28e2 | 40 | |
pwheels | 0:1193dbfe28e2 | 41 | #endif |
pwheels | 0:1193dbfe28e2 | 42 | |
pwheels | 0:1193dbfe28e2 | 43 |