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 
21 #ifndef DS18_INTERNAL_H
22 #define DS18_INTERNAL_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define DS18_CMD_CONVERT (0x44)
33 #define DS18_CMD_RSCRATCHPAD (0xbe)
34 #define DS18_CMD_WRITESCRATCHPAD (0x4e)
35 #define DS18_CMD_COPYSCRATCHPAD (0x48)
36 #define DS18_CMD_RECALLE (0xb8)
37 #define DS18_CMD_RPWRSPPLY (0xb4)
38 #define DS18_CMD_SEARCHROM (0xf0)
39 #define DS18_CMD_READROM (0x33)
40 #define DS18_CMD_MATCHROM (0x55)
41 #define DS18_CMD_SEARCHROM (0xf0)
42 #define DS18_CMD_ALARMSEARCH (0xec)
43 #define DS18_CMD_SKIPROM (0xcc)
44 
50 #define DS18_DELAY_RESET (480U)
51 #define DS18_DELAY_PRESENCE (60U)
52 #define DS18_DELAY_SLOT (60U)
53 #define DS18_SAMPLE_TIME (10U)
54 #define DS18_DELAY_CONVERT (750U * US_PER_MS)
55 #define DS18_DELAY_RW_PULSE (1U)
56 #define DS18_DELAY_R_RECOVER (DS18_DELAY_SLOT - DS18_SAMPLE_TIME)
57 
59 #ifdef __cplusplus
60 }
61 #endif
62 
64 #endif /* DS18_INTERNAL_H */