affichage fonctionne, valeurs reçues (255)

Dependencies:   mbed

Fork of Main_V3_Old by EI2I_4_projet_1_2017-2018

Committer:
Aureb29
Date:
Mon Jan 15 11:22:40 2018 +0000
Revision:
9:e79b746421b1
Parent:
4:784c4b53a3d4
Main V3

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ChrisnieM 4:784c4b53a3d4 1 /*
ChrisnieM 4:784c4b53a3d4 2 * OneWireCRC. This is a port to mbed of Jim Studt's Adruino One Wire
ChrisnieM 4:784c4b53a3d4 3 * library.
ChrisnieM 4:784c4b53a3d4 4 *
ChrisnieM 4:784c4b53a3d4 5 * Copyright (C) <2009> Petras Saduikis <petras@petras.co.uk>
ChrisnieM 4:784c4b53a3d4 6 *
ChrisnieM 4:784c4b53a3d4 7 * This file is part of OneWireCRC.
ChrisnieM 4:784c4b53a3d4 8 *
ChrisnieM 4:784c4b53a3d4 9 * OneWireCRC is free software: you can redistribute it and/or modify
ChrisnieM 4:784c4b53a3d4 10 * it under the terms of the GNU General Public License as published by
ChrisnieM 4:784c4b53a3d4 11 * the Free Software Foundation, either version 3 of the License, or
ChrisnieM 4:784c4b53a3d4 12 * (at your option) any later version.
ChrisnieM 4:784c4b53a3d4 13 *
ChrisnieM 4:784c4b53a3d4 14 * OneWireCRC is distributed in the hope that it will be useful,
ChrisnieM 4:784c4b53a3d4 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ChrisnieM 4:784c4b53a3d4 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ChrisnieM 4:784c4b53a3d4 17 * GNU General Public License for more details.
ChrisnieM 4:784c4b53a3d4 18 *
ChrisnieM 4:784c4b53a3d4 19 * You should have received a copy of the GNU General Public License
ChrisnieM 4:784c4b53a3d4 20 * along with OneWireCRC. If not, see <http://www.gnu.org/licenses/>.
ChrisnieM 4:784c4b53a3d4 21 */
ChrisnieM 4:784c4b53a3d4 22
ChrisnieM 4:784c4b53a3d4 23 #ifndef SNATCH59_ONEWIREDEFS_H
ChrisnieM 4:784c4b53a3d4 24 #define SNATCH59_ONEWIREDEFS_H
ChrisnieM 4:784c4b53a3d4 25
ChrisnieM 4:784c4b53a3d4 26 // device ids
ChrisnieM 4:784c4b53a3d4 27 #define DS18B20_ID 0x28
ChrisnieM 4:784c4b53a3d4 28 #define DS18S20_ID 0x10
ChrisnieM 4:784c4b53a3d4 29
ChrisnieM 4:784c4b53a3d4 30 #define ALARM_CONFIG_SIZE 3
ChrisnieM 4:784c4b53a3d4 31 #define THERMOM_SCRATCHPAD_SIZE 9
ChrisnieM 4:784c4b53a3d4 32 #define THERMOM_CRC_BYTE 8
ChrisnieM 4:784c4b53a3d4 33 #define ADDRESS_SIZE 8
ChrisnieM 4:784c4b53a3d4 34 #define ADDRESS_CRC_BYTE 7
ChrisnieM 4:784c4b53a3d4 35
ChrisnieM 4:784c4b53a3d4 36 // One Wire command codes
ChrisnieM 4:784c4b53a3d4 37 #define OVERDRIVE_SKIP 0x3C
ChrisnieM 4:784c4b53a3d4 38 // ROM commands
ChrisnieM 4:784c4b53a3d4 39 #define SEARCH_ROM 0xF0
ChrisnieM 4:784c4b53a3d4 40 #define READ_ROM 0x33
ChrisnieM 4:784c4b53a3d4 41 #define MATCH_ROM 0x55
ChrisnieM 4:784c4b53a3d4 42 #define SKIP_ROM 0xCC
ChrisnieM 4:784c4b53a3d4 43 #define ALARM_SEARCH 0xEC
ChrisnieM 4:784c4b53a3d4 44 // Functions Commnds
ChrisnieM 4:784c4b53a3d4 45 #define CONVERT 0x44
ChrisnieM 4:784c4b53a3d4 46 #define WRITESCRATCH 0x4E
ChrisnieM 4:784c4b53a3d4 47 #define READSCRATCH 0xBE
ChrisnieM 4:784c4b53a3d4 48 #define COPYSCRATCH 0x48
ChrisnieM 4:784c4b53a3d4 49 #define RECALLE2 0xB8
ChrisnieM 4:784c4b53a3d4 50 #define READPOWERSUPPLY 0xB4
ChrisnieM 4:784c4b53a3d4 51
ChrisnieM 4:784c4b53a3d4 52 // temperature read resolutions
ChrisnieM 4:784c4b53a3d4 53 enum eResolution {nineBit = 0, tenBit, elevenBit, twelveBit};
ChrisnieM 4:784c4b53a3d4 54 const int CONVERSION_TIME[] = {94, 188, 375, 750}; // milli-seconds
ChrisnieM 4:784c4b53a3d4 55
ChrisnieM 4:784c4b53a3d4 56 // DS18B20/DS18S20 related
ChrisnieM 4:784c4b53a3d4 57 #define TEMPERATURE_LSB 0
ChrisnieM 4:784c4b53a3d4 58 #define TEMPERATURE_MSB 1
ChrisnieM 4:784c4b53a3d4 59 #define HIGH_ALARM_BYTE 2
ChrisnieM 4:784c4b53a3d4 60 #define LOW_ALARM_BYTE 3
ChrisnieM 4:784c4b53a3d4 61 #define CONFIG_REG_BYTE 4
ChrisnieM 4:784c4b53a3d4 62 #define CONFIG_READ_END 5
ChrisnieM 4:784c4b53a3d4 63 #define COUNT_REMAIN_BYTE 6
ChrisnieM 4:784c4b53a3d4 64 #define COUNT_PER_DEG_BYTE 7
ChrisnieM 4:784c4b53a3d4 65
ChrisnieM 4:784c4b53a3d4 66 #endif