Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
lis3mdl-internal.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2015 HAW Hamburg
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
27
#define LIS3MDL_CHIP_ID (0x3D)
28
#define LIS3MDL_CHIP_ADDR (0x1C)
30
35
#define LIS3DML_WHO_AM_I_REG (0x0F)
37
42
#define LIS3MDL_CTRL_REG1 (0x20)
43
#define LIS3MDL_CTRL_REG2 (0x21)
44
#define LIS3MDL_CTRL_REG3 (0x22)
45
#define LIS3MDL_CTRL_REG4 (0x23)
46
#define LIS3MDL_CTRL_REG5 (0x24)
48
53
#define LIS3MDL_MASK_REG1_TEMP_EN (0x80)
55
60
#define LIS3MDL_MASK_REG2_REBOOT (0x06)
61
#define LIS3MDL_MASK_REG2_SOFT_RST (0x04)
63
68
#define LIS3MDL_MASK_REG3_LOW_POWER_EN (0x02)
69
#define LIS3MDL_MASK_REG3_CONT_CONV_MODE (0x00)
70
#define LIS3MDL_MASK_REG3_Z_LOW_POWER (0x00)
71
#define LIS3MDL_MASK_REG3_Z_MEDIUM_POWER (0x04)
73
78
#define LIS3MDL_MASK_REG5_BDU (0x40)
79
#define LIS3MDL_MASK_REG5_BDU_OFF (0x00)
81
86
#define LIS3MDL_STATUS_REG (0x27)
88
93
#define LIS3MDL_OUT_X_L_REG (0x28)
94
#define LIS3MDL_OUT_X_H_REG (0x29)
95
#define LIS3MDL_OUT_Y_L_REG (0x2A)
96
#define LIS3MDL_OUT_Y_H_REG (0x2B)
97
#define LIS3MDL_OUT_Z_L_REG (0x2C)
98
#define LIS3MDL_OUT_Z_H_REG (0x2D)
100
105
#define LIS3MDL_TEMP_OUT_L_REG (0x2E)
106
#define LIS3MDL_TEMP_OUT_H_REG (0x2F)
108
113
#define LIS3MDL_INT_CFG_REG (0x30)
114
#define LIS3MDL_INT_SRC_REG (0x31)
115
#define LIS3MDL_INT_THS_L_REG (0x32)
116
#define LIS3MDL_INT_THS_H_REG (0x33)
118
123
#define LIS3MDL_MASK_INT_CFG_XIEN (0x80)
124
#define LIS3MDL_MASK_INT_CFG_YIEN (0x40)
125
#define LIS3MDL_MASK_INT_CFG_ZIEN (0x20)
126
#define LIS3MDL_MASK_INT_CFG_IEA (0x04)
127
#define LIS3MDL_MASK_INT_CFG_LIR (0x02)
128
#define LIS3MDL_MASK_INT_CFG_IEN (0x01)
130
135
#define LIS3MDL_MASK_INT_SRC_PTH_X (0x80)
136
#define LIS3MDL_MASK_INT_SRC_PTH_Y (0x40)
137
#define LIS3MDL_MASK_INT_SRC_PTH_Z (0x20)
138
#define LIS3MDL_MASK_INT_SRC_NTH_X (0x10)
139
#define LIS3MDL_MASK_INT_SRC_NTH_Y (0x08)
140
#define LIS3MDL_MASK_INT_SRC_NTH_Z (0x04)
141
#define LIS3MDL_MASK_INT_SRC_MROI (0x02)
142
#define LIS3MDL_MASK_INT_SRC_INT (0x01)
144
145
#ifdef __cplusplus
146
}
147
#endif
148
Generated on Fri May 1 2026 15:22:59 by
1.13.2