![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
DS18B20.h@0:2f78e3dca55d, 2011-10-17 (annotated)
- Committer:
- gbeardall
- Date:
- Mon Oct 17 10:42:00 2011 +0000
- Revision:
- 0:2f78e3dca55d
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
gbeardall | 0:2f78e3dca55d | 1 | /* |
gbeardall | 0:2f78e3dca55d | 2 | * DS18B20. Maxim DS18B20 One-Wire Thermometer. |
gbeardall | 0:2f78e3dca55d | 3 | * Uses the OneWireCRC library. |
gbeardall | 0:2f78e3dca55d | 4 | * |
gbeardall | 0:2f78e3dca55d | 5 | * Copyright (C) <2010> Petras Saduikis <petras@petras.co.uk> |
gbeardall | 0:2f78e3dca55d | 6 | * |
gbeardall | 0:2f78e3dca55d | 7 | * This file is part of OneWireThermometer. |
gbeardall | 0:2f78e3dca55d | 8 | * |
gbeardall | 0:2f78e3dca55d | 9 | * OneWireThermometer is free software: you can redistribute it and/or modify |
gbeardall | 0:2f78e3dca55d | 10 | * it under the terms of the GNU General Public License as published by |
gbeardall | 0:2f78e3dca55d | 11 | * the Free Software Foundation, either version 3 of the License, or |
gbeardall | 0:2f78e3dca55d | 12 | * (at your option) any later version. |
gbeardall | 0:2f78e3dca55d | 13 | * |
gbeardall | 0:2f78e3dca55d | 14 | * OneWireThermometer is distributed in the hope that it will be useful, |
gbeardall | 0:2f78e3dca55d | 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
gbeardall | 0:2f78e3dca55d | 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
gbeardall | 0:2f78e3dca55d | 17 | * GNU General Public License for more details. |
gbeardall | 0:2f78e3dca55d | 18 | * |
gbeardall | 0:2f78e3dca55d | 19 | * You should have received a copy of the GNU General Public License |
gbeardall | 0:2f78e3dca55d | 20 | * along with OneWireThermometer. If not, see <http://www.gnu.org/licenses/>. |
gbeardall | 0:2f78e3dca55d | 21 | */ |
gbeardall | 0:2f78e3dca55d | 22 | |
gbeardall | 0:2f78e3dca55d | 23 | #ifndef SNATCH59_DS18B20_H |
gbeardall | 0:2f78e3dca55d | 24 | #define SNATCH59_DS18B20_H |
gbeardall | 0:2f78e3dca55d | 25 | |
gbeardall | 0:2f78e3dca55d | 26 | #include "OneWireThermometer.h" |
gbeardall | 0:2f78e3dca55d | 27 | #include "OneWireDefs.h" |
gbeardall | 0:2f78e3dca55d | 28 | |
gbeardall | 0:2f78e3dca55d | 29 | class DS18B20 : public OneWireThermometer |
gbeardall | 0:2f78e3dca55d | 30 | { |
gbeardall | 0:2f78e3dca55d | 31 | public: |
gbeardall | 0:2f78e3dca55d | 32 | DS18B20(bool crcOn, bool useAddr, bool parasitic, PinName pin); |
gbeardall | 0:2f78e3dca55d | 33 | |
gbeardall | 0:2f78e3dca55d | 34 | virtual void setResolution(eResolution resln); |
gbeardall | 0:2f78e3dca55d | 35 | |
gbeardall | 0:2f78e3dca55d | 36 | protected: |
gbeardall | 0:2f78e3dca55d | 37 | virtual float calculateTemperature(BYTE* data); |
gbeardall | 0:2f78e3dca55d | 38 | }; |
gbeardall | 0:2f78e3dca55d | 39 | |
gbeardall | 0:2f78e3dca55d | 40 | |
gbeardall | 0:2f78e3dca55d | 41 | #endif |