OneWire Temperature library for interfacing DS18B20

Dependents:   DallasTemperature project1

Committer:
Wimpie
Date:
Sun Apr 17 17:27:20 2011 +0000
Revision:
0:ad90c2e86a63
improved 1W search function

Who changed what in which revision?

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