Register definitions for the Honeywell HMC5883L 3-axis digital compass. More...

Detailed Description

Register definitions for the Honeywell HMC5883L 3-axis digital compass.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file hmc5883l_regs.h.

Go to the source code of this file.

#define HMC5883L_I2C_ADDRESS   (0x1e)
 HMC5883L I2C address.
 
#define HMC5883L_ID   { 0x48, 0x34, 0x33 }
 HMC5883L chip id defined in Identification Registers A..C.
 
#define HMC5883L_ID_LEN   (3)
 HMC5883L chip id length.
 

Register addresses

#define HMC5883L_REG_CFG_A   (0x00)
 
#define HMC5883L_REG_CFG_B   (0x01)
 
#define HMC5883L_REG_MODE   (0x02)
 
#define HMC5883L_REG_OUT_X_MSB   (0x03)
 
#define HMC5883L_REG_OUT_X_LSB   (0x04)
 
#define HMC5883L_REG_OUT_Y_MSB   (0x05)
 
#define HMC5883L_REG_OUT_Y_LSB   (0x06)
 
#define HMC5883L_REG_OUT_Z_MSB   (0x07)
 
#define HMC5883L_REG_OUT_Z_LSB   (0x08)
 
#define HMC5883L_REG_STATUS   (0x09)
 
#define HMC5883L_REG_ID_A   (0x0a)
 
#define HMC5883L_REG_ID_B   (0x0b)
 
#define HMC5883L_REG_ID_C   (0x0c)
 

Register structure definitions

#define HMC5883L_REG_CFG_A_MA   (0x60)
 HMC5883L_REG_CFG_A<6:5>
 
#define HMC5883L_REG_CFG_A_DO   (0x1c)
 HMC5883L_REG_CFG_A<4:2>
 
#define HMC5883L_REG_CFG_A_MS   (0x03)
 HMC5883L_REG_CFG_A<1:0>
 
#define HMC5883L_REG_CFG_B_GN   (0xe0)
 HMC5883L_REG_CFG_N<7:5>
 
#define HMC5883L_REG_CFG_B_GN_S   (5)
 HMC5883L_REG_CFG_N<7:5> shift.
 
#define HMC5883L_REG_MODE_HS   (0x80)
 HMC5883L_REG_MODE<7>
 
#define HMC5883L_REG_MODE_MD   (0x03)
 HMC5883L_REG_MODE<1:0>
 
#define HMC5883L_REG_STATUS_LOCK   (0x02)
 HMC5883L_REG_STATUS<1>
 
#define HMC5883L_REG_STATUS_RDY   (0x01)
 HMC5883L_REG_STATUS<0>