1 /* 2 * Copyright (c) 2023 Google LLC 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 6 #ifndef ZEPHYR_DRIVERS_SENSOR_AKM09918C_AKM09918C_REG_H 7 #define ZEPHYR_DRIVERS_SENSOR_AKM09918C_AKM09918C_REG_H 8 9 #include <zephyr/sys/util_macro.h> 10 11 #define AKM09918C_REG_WIA1 0x00 12 #define AKM09918C_REG_WIA2 0x01 13 #define AKM09918C_REG_RSV1 0x02 14 #define AKM09918C_REG_RSV2 0x03 15 #define AKM09918C_REG_ST1 0x10 16 #define AKM09918C_REG_HXL 0x11 17 #define AKM09918C_REG_HXH 0x12 18 #define AKM09918C_REG_HYL 0x13 19 #define AKM09918C_REG_HYH 0x14 20 #define AKM09918C_REG_HZL 0x15 21 #define AKM09918C_REG_HZH 0x16 22 #define AKM09918C_REG_TMPS 0x17 23 #define AKM09918C_REG_ST2 0x18 24 #define AKM09918C_REG_CNTL1 0x30 25 #define AKM09918C_REG_CNTL2 0x31 26 #define AKM09918C_REG_CNTL3 0x32 27 #define AKM09918C_REG_TS1 0x33 28 #define AKM09918C_REG_TS2 0x34 29 30 /* Who-I-Am register values */ 31 #define AKM09918C_WIA1 0x48 32 #define AKM09918C_WIA2 0x0c 33 34 /* ST1 values */ 35 #define AKM09918C_ST1_DRDY BIT(0) 36 #define AKM09918C_ST1_DOR BIT(1) 37 38 /* CNTL2 values */ 39 #define AKM09918C_CNTL2_PWR_DOWN 0x00 40 #define AKM09918C_CNTL2_SINGLE_MEASURE BIT(0) 41 #define AKM09918C_CNTL2_CONTINUOUS_1 BIT(1) 42 #define AKM09918C_CNTL2_CONTINUOUS_2 BIT(2) 43 #define AKM09918C_CNTL2_CONTINUOUS_3 (BIT(1) | BIT(2)) 44 #define AKM09918C_CNTL2_CONTINUOUS_4 BIT(3) 45 46 /* CNTL3 values */ 47 #define AKM09918C_CNTL3_SRST BIT(0) 48 49 #endif /* ZEPHYR_DRIVERS_SENSOR_AKM09918C_AKM09918C_REG_H */ 50