ds18_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Frits Kuipers
3  * 2018 HAW Hamburg
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
10 #pragma once
11 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
31 #define DS18_CMD_CONVERT (0x44)
32 #define DS18_CMD_RSCRATCHPAD (0xbe)
33 #define DS18_CMD_WRITESCRATCHPAD (0x4e)
34 #define DS18_CMD_COPYSCRATCHPAD (0x48)
35 #define DS18_CMD_RECALLE (0xb8)
36 #define DS18_CMD_RPWRSPPLY (0xb4)
37 #define DS18_CMD_SEARCHROM (0xf0)
38 #define DS18_CMD_READROM (0x33)
39 #define DS18_CMD_MATCHROM (0x55)
40 #define DS18_CMD_SEARCHROM (0xf0)
41 #define DS18_CMD_ALARMSEARCH (0xec)
42 #define DS18_CMD_SKIPROM (0xcc)
49 #define DS18_DELAY_RESET (480U)
50 #define DS18_DELAY_PRESENCE (60U)
51 #define DS18_DELAY_SLOT (60U)
52 #define DS18_SAMPLE_TIME (10U)
53 #define DS18_DELAY_CONVERT (750U * US_PER_MS)
54 #define DS18_DELAY_RW_PULSE (1U)
55 #define DS18_DELAY_R_RECOVER (DS18_DELAY_SLOT - DS18_SAMPLE_TIME)
58 #ifdef __cplusplus
59 }
60 #endif