Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
hmc58xx_regs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2011 Gautier Hattenberger
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
27#ifndef HMC58XX_REGS_H
28#define HMC58XX_REGS_H
29
30/* default I2C address */
31#define HMC58XX_ADDR 0x3C
32
33/* Registers */
34#define HMC58XX_REG_CFGA 0x00
35#define HMC58XX_REG_CFGB 0x01
36#define HMC58XX_REG_MODE 0x02
37#define HMC58XX_REG_DATXM 0x03
38#define HMC58XX_REG_DATXL 0x04
39
40/* Warning!
41 * The HMC5843 and HMC5883 differ here.
42 * - HMC5843 order: Y,Z
43 * - HMC5883 order: Z,Y
44 * So we make defines for each version explicitly.
45 */
46#define HMC5843_REG_DATYM 0x05
47#define HMC5843_REG_DATYL 0x06
48#define HMC5843_REG_DATZM 0x07
49#define HMC5843_REG_DATZL 0x08
50
51#define HMC5883_REG_DATZM 0x05
52#define HMC5883_REG_DATZL 0x06
53#define HMC5883_REG_DATYM 0x07
54#define HMC5883_REG_DATYL 0x08
55
56
57#define HMC58XX_REG_STATUS 0x09
58#define HMC58XX_REG_IDA 0x0A
59#define HMC58XX_REG_IDB 0x0B
60#define HMC58XX_REG_IDC 0x0C
61
62#endif // HMC58XX_REGS_H