Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
hmc5883l_regs.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2018 Gunar Schorcht
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
15
16
#ifdef __cplusplus
17
extern
"C"
18
{
19
#endif
20
22
#define HMC5883L_I2C_ADDRESS (0x1e)
23
25
#define HMC5883L_ID { 0x48, 0x34, 0x33 }
26
28
#define HMC5883L_ID_LEN (3)
29
34
#define HMC5883L_REG_CFG_A (0x00)
35
#define HMC5883L_REG_CFG_B (0x01)
36
#define HMC5883L_REG_MODE (0x02)
37
#define HMC5883L_REG_OUT_X_MSB (0x03)
38
#define HMC5883L_REG_OUT_X_LSB (0x04)
39
#define HMC5883L_REG_OUT_Y_MSB (0x05)
40
#define HMC5883L_REG_OUT_Y_LSB (0x06)
41
#define HMC5883L_REG_OUT_Z_MSB (0x07)
42
#define HMC5883L_REG_OUT_Z_LSB (0x08)
43
#define HMC5883L_REG_STATUS (0x09)
44
#define HMC5883L_REG_ID_A (0x0a)
45
#define HMC5883L_REG_ID_B (0x0b)
46
#define HMC5883L_REG_ID_C (0x0c)
48
53
#define HMC5883L_REG_CFG_A_MA (0x60)
54
#define HMC5883L_REG_CFG_A_DO (0x1c)
55
#define HMC5883L_REG_CFG_A_MS (0x03)
56
57
#define HMC5883L_REG_CFG_B_GN (0xe0)
58
#define HMC5883L_REG_CFG_B_GN_S (5)
59
60
#define HMC5883L_REG_MODE_HS (0x80)
61
#define HMC5883L_REG_MODE_MD (0x03)
62
63
#define HMC5883L_REG_STATUS_LOCK (0x02)
64
#define HMC5883L_REG_STATUS_RDY (0x01)
66
67
#ifdef __cplusplus
68
}
69
#endif
70
Generated on Wed Apr 15 2026 03:46:09 by
1.13.2