ds18_internal.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2017 Frits Kuipers
3  * SPDX-FileCopyrightText: 2018 HAW Hamburg
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
9 #include "time_units.h"
10 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 #define DS18_CMD_CONVERT (0x44)
31 #define DS18_CMD_RSCRATCHPAD (0xbe)
32 #define DS18_CMD_WRITESCRATCHPAD (0x4e)
33 #define DS18_CMD_COPYSCRATCHPAD (0x48)
34 #define DS18_CMD_RECALLE (0xb8)
35 #define DS18_CMD_RPWRSPPLY (0xb4)
36 #define DS18_CMD_SEARCHROM (0xf0)
37 #define DS18_CMD_READROM (0x33)
38 #define DS18_CMD_MATCHROM (0x55)
39 #define DS18_CMD_SEARCHROM (0xf0)
40 #define DS18_CMD_ALARMSEARCH (0xec)
41 #define DS18_CMD_SKIPROM (0xcc)
48 #define DS18_DELAY_RESET (480U)
49 #define DS18_DELAY_PRESENCE (60U)
50 #define DS18_DELAY_SLOT (60U)
51 #define DS18_SAMPLE_TIME (10U)
52 #define DS18_DELAY_CONVERT (750U * US_PER_MS)
53 #define DS18_DELAY_RW_PULSE (1U)
54 #define DS18_DELAY_R_RECOVER (DS18_DELAY_SLOT - DS18_SAMPLE_TIME)
57 #ifdef __cplusplus
58 }
59 #endif
Utility header providing time unit defines.