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
* 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
17
#ifndef HMC5883L_REGS_H
18
#define HMC5883L_REGS_H
19
20
#ifdef __cplusplus
21
extern
"C"
22
{
23
#endif
24
26
#define HMC5883L_I2C_ADDRESS (0x1e)
27
29
#define HMC5883L_ID { 0x48, 0x34, 0x33 }
30
32
#define HMC5883L_ID_LEN (3)
33
38
#define HMC5883L_REG_CFG_A (0x00)
39
#define HMC5883L_REG_CFG_B (0x01)
40
#define HMC5883L_REG_MODE (0x02)
41
#define HMC5883L_REG_OUT_X_MSB (0x03)
42
#define HMC5883L_REG_OUT_X_LSB (0x04)
43
#define HMC5883L_REG_OUT_Y_MSB (0x05)
44
#define HMC5883L_REG_OUT_Y_LSB (0x06)
45
#define HMC5883L_REG_OUT_Z_MSB (0x07)
46
#define HMC5883L_REG_OUT_Z_LSB (0x08)
47
#define HMC5883L_REG_STATUS (0x09)
48
#define HMC5883L_REG_ID_A (0x0a)
49
#define HMC5883L_REG_ID_B (0x0b)
50
#define HMC5883L_REG_ID_C (0x0c)
57
#define HMC5883L_REG_CFG_A_MA (0x60)
58
#define HMC5883L_REG_CFG_A_DO (0x1c)
59
#define HMC5883L_REG_CFG_A_MS (0x03)
61
#define HMC5883L_REG_CFG_B_GN (0xe0)
62
#define HMC5883L_REG_CFG_B_GN_S (5)
64
#define HMC5883L_REG_MODE_HS (0x80)
65
#define HMC5883L_REG_MODE_MD (0x03)
67
#define HMC5883L_REG_STATUS_LOCK (0x02)
68
#define HMC5883L_REG_STATUS_RDY (0x01)
71
#ifdef __cplusplus
72
}
73
#endif
74
75
#endif
/* HMC5883L_REGS_H */
Generated on Sat Nov 23 2024 16:31:08 by
1.9.8