am2315reg.h revision 1.1 1 1.1 christos /*
2 1.1 christos * Copyright (c) 2017 Brad Spencer <brad (at) anduin.eldar.org>
3 1.1 christos *
4 1.1 christos * Permission to use, copy, modify, and distribute this software for any
5 1.1 christos * purpose with or without fee is hereby granted, provided that the above
6 1.1 christos * copyright notice and this permission notice appear in all copies.
7 1.1 christos *
8 1.1 christos * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 1.1 christos * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 1.1 christos * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 1.1 christos * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 1.1 christos * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 1.1 christos * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 1.1 christos * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 1.1 christos */
16 1.1 christos
17 1.1 christos #ifndef _DEV_I2C_AM2315REG_H_
18 1.1 christos #define _DEV_I2C_AM2315REG_H_
19 1.1 christos
20 1.1 christos #define AM2315_TYPICAL_ADDR 0x5c
21 1.1 christos
22 1.1 christos #define AM2315_READ_REGISTERS 0x03
23 1.1 christos #define AM2315_WRITE_REGISTERS 0x10
24 1.1 christos
25 1.1 christos #define AM2315_REGISTER_HIGH_RH 0x00
26 1.1 christos #define AM2315_REGISTER_LOW_RH 0x01
27 1.1 christos #define AM2315_REGISTER_HIGH_TEMP 0x02
28 1.1 christos #define AM2315_REGISTER_LOW_TEMP 0x03
29 1.1 christos #define AM2315_REGISTER_RETENTION_04 0x04
30 1.1 christos #define AM2315_REGISTER_RETENTION_05 0x05
31 1.1 christos #define AM2315_REGISTER_RETENTION_06 0x06
32 1.1 christos #define AM2315_REGISTER_RETENTION_07 0x07
33 1.1 christos #define AM2315_REGISTER_HIGH_MODEL 0x08
34 1.1 christos #define AM2315_REGISTER_LOW_MODEL 0x09
35 1.1 christos #define AM2315_REGISTER_VERSION 0x0a
36 1.1 christos #define AM2315_REGISTER_ID_PT_24_31 0x0b
37 1.1 christos #define AM2315_REGISTER_ID_PT_16_23 0x0c
38 1.1 christos #define AM2315_REGISTER_ID_PT_8_15 0x0d
39 1.1 christos #define AM2315_REGISTER_ID_PT_0_7 0x0e
40 1.1 christos #define AM2315_REGISTER_STATUS 0x0f
41 1.1 christos #define AM2315_REGISTER_HIGH_USER1 0x10
42 1.1 christos #define AM2315_REGISTER_LOW_USER1 0x11
43 1.1 christos #define AM2315_REGISTER_HIGH_USER2 0x12
44 1.1 christos #define AM2315_REGISTER_LOW_USER2 0x13
45 1.1 christos #define AM2315_REGISTER_RETENTION_14 0x14
46 1.1 christos #define AM2315_REGISTER_RETENTION_15 0x15
47 1.1 christos #define AM2315_REGISTER_RETENTION_16 0x16
48 1.1 christos #define AM2315_REGISTER_RETENTION_17 0x17
49 1.1 christos #define AM2315_REGISTER_RETENTION_18 0x18
50 1.1 christos #define AM2315_REGISTER_RETENTION_19 0x19
51 1.1 christos #define AM2315_REGISTER_RETENTION_1a 0x1a
52 1.1 christos #define AM2315_REGISTER_RETENTION_1b 0x1b
53 1.1 christos #define AM2315_REGISTER_RETENTION_1c 0x1c
54 1.1 christos #define AM2315_REGISTER_RETENTION_1d 0x1d
55 1.1 christos #define AM2315_REGISTER_RETENTION_1e 0x1e
56 1.1 christos #define AM2315_REGISTER_RETENTION_1f 0x1f
57 1.1 christos
58 1.1 christos #define AM2315_TEMP_NEGATIVE 0x80
59 1.1 christos
60 1.1 christos #endif
61