Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
hmc5883l_regs.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 Gunar Schorcht
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
19
#ifdef __cplusplus
20
extern
"C"
21
{
22
#endif
23
25
#define HMC5883L_I2C_ADDRESS (0x1e)
26
28
#define HMC5883L_ID { 0x48, 0x34, 0x33 }
29
31
#define HMC5883L_ID_LEN (3)
32
37
#define HMC5883L_REG_CFG_A (0x00)
38
#define HMC5883L_REG_CFG_B (0x01)
39
#define HMC5883L_REG_MODE (0x02)
40
#define HMC5883L_REG_OUT_X_MSB (0x03)
41
#define HMC5883L_REG_OUT_X_LSB (0x04)
42
#define HMC5883L_REG_OUT_Y_MSB (0x05)
43
#define HMC5883L_REG_OUT_Y_LSB (0x06)
44
#define HMC5883L_REG_OUT_Z_MSB (0x07)
45
#define HMC5883L_REG_OUT_Z_LSB (0x08)
46
#define HMC5883L_REG_STATUS (0x09)
47
#define HMC5883L_REG_ID_A (0x0a)
48
#define HMC5883L_REG_ID_B (0x0b)
49
#define HMC5883L_REG_ID_C (0x0c)
56
#define HMC5883L_REG_CFG_A_MA (0x60)
57
#define HMC5883L_REG_CFG_A_DO (0x1c)
58
#define HMC5883L_REG_CFG_A_MS (0x03)
60
#define HMC5883L_REG_CFG_B_GN (0xe0)
61
#define HMC5883L_REG_CFG_B_GN_S (5)
63
#define HMC5883L_REG_MODE_HS (0x80)
64
#define HMC5883L_REG_MODE_MD (0x03)
66
#define HMC5883L_REG_STATUS_LOCK (0x02)
67
#define HMC5883L_REG_STATUS_RDY (0x01)
70
#ifdef __cplusplus
71
}
72
#endif
73
Generated on Fri Jun 20 2025 21:02:36 by
1.9.1