lis3mdl-internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 HAW Hamburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 #define LIS3MDL_CHIP_ID (0x3D)
31 #define LIS3MDL_CHIP_ADDR (0x1C)
38 #define LIS3DML_WHO_AM_I_REG (0x0F)
45 #define LIS3MDL_CTRL_REG1 (0x20)
46 #define LIS3MDL_CTRL_REG2 (0x21)
47 #define LIS3MDL_CTRL_REG3 (0x22)
48 #define LIS3MDL_CTRL_REG4 (0x23)
49 #define LIS3MDL_CTRL_REG5 (0x24)
56 #define LIS3MDL_MASK_REG1_TEMP_EN (0x80)
63 #define LIS3MDL_MASK_REG2_REBOOT (0x06)
64 #define LIS3MDL_MASK_REG2_SOFT_RST (0x04)
71 #define LIS3MDL_MASK_REG3_LOW_POWER_EN (0x02)
72 #define LIS3MDL_MASK_REG3_CONT_CONV_MODE (0x00)
73 #define LIS3MDL_MASK_REG3_Z_LOW_POWER (0x00)
74 #define LIS3MDL_MASK_REG3_Z_MEDIUM_POWER (0x04)
81 #define LIS3MDL_MASK_REG5_BDU (0x40)
82 #define LIS3MDL_MASK_REG5_BDU_OFF (0x00)
89 #define LIS3MDL_STATUS_REG (0x27)
96 #define LIS3MDL_OUT_X_L_REG (0x28)
97 #define LIS3MDL_OUT_X_H_REG (0x29)
98 #define LIS3MDL_OUT_Y_L_REG (0x2A)
99 #define LIS3MDL_OUT_Y_H_REG (0x2B)
100 #define LIS3MDL_OUT_Z_L_REG (0x2C)
101 #define LIS3MDL_OUT_Z_H_REG (0x2D)
108 #define LIS3MDL_TEMP_OUT_L_REG (0x2E)
109 #define LIS3MDL_TEMP_OUT_H_REG (0x2F)
116 #define LIS3MDL_INT_CFG_REG (0x30)
117 #define LIS3MDL_INT_SRC_REG (0x31)
118 #define LIS3MDL_INT_THS_L_REG (0x32)
119 #define LIS3MDL_INT_THS_H_REG (0x33)
126 #define LIS3MDL_MASK_INT_CFG_XIEN (0x80)
127 #define LIS3MDL_MASK_INT_CFG_YIEN (0x40)
128 #define LIS3MDL_MASK_INT_CFG_ZIEN (0x20)
129 #define LIS3MDL_MASK_INT_CFG_IEA (0x04)
130 #define LIS3MDL_MASK_INT_CFG_LIR (0x02)
131 #define LIS3MDL_MASK_INT_CFG_IEN (0x01)
138 #define LIS3MDL_MASK_INT_SRC_PTH_X (0x80)
139 #define LIS3MDL_MASK_INT_SRC_PTH_Y (0x40)
140 #define LIS3MDL_MASK_INT_SRC_PTH_Z (0x20)
141 #define LIS3MDL_MASK_INT_SRC_NTH_X (0x10)
142 #define LIS3MDL_MASK_INT_SRC_NTH_Y (0x08)
143 #define LIS3MDL_MASK_INT_SRC_NTH_Z (0x04)
144 #define LIS3MDL_MASK_INT_SRC_MROI (0x02)
145 #define LIS3MDL_MASK_INT_SRC_INT (0x01)
148 #ifdef __cplusplus
149 }
150 #endif
151