Loading...
Searching...
No Matches

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>
 

Macro Definition Documentation

◆ HMC5883L_I2C_ADDRESS

#define HMC5883L_I2C_ADDRESS   (0x1e)

HMC5883L I2C address.

Definition at line 26 of file hmc5883l_regs.h.

◆ HMC5883L_ID

#define HMC5883L_ID   { 0x48, 0x34, 0x33 }

HMC5883L chip id defined in Identification Registers A..C.

Definition at line 29 of file hmc5883l_regs.h.

◆ HMC5883L_ID_LEN

#define HMC5883L_ID_LEN   (3)

HMC5883L chip id length.

Definition at line 32 of file hmc5883l_regs.h.

◆ HMC5883L_REG_CFG_A

#define HMC5883L_REG_CFG_A   (0x00)

Definition at line 38 of file hmc5883l_regs.h.

◆ HMC5883L_REG_CFG_A_DO

#define HMC5883L_REG_CFG_A_DO   (0x1c)

HMC5883L_REG_CFG_A<4:2>

Definition at line 58 of file hmc5883l_regs.h.

◆ HMC5883L_REG_CFG_A_MA

#define HMC5883L_REG_CFG_A_MA   (0x60)

HMC5883L_REG_CFG_A<6:5>

Definition at line 57 of file hmc5883l_regs.h.

◆ HMC5883L_REG_CFG_A_MS

#define HMC5883L_REG_CFG_A_MS   (0x03)

HMC5883L_REG_CFG_A<1:0>

Definition at line 59 of file hmc5883l_regs.h.

◆ HMC5883L_REG_CFG_B

#define HMC5883L_REG_CFG_B   (0x01)

Definition at line 39 of file hmc5883l_regs.h.

◆ HMC5883L_REG_CFG_B_GN

#define HMC5883L_REG_CFG_B_GN   (0xe0)

HMC5883L_REG_CFG_N<7:5>

Definition at line 61 of file hmc5883l_regs.h.

◆ HMC5883L_REG_CFG_B_GN_S

#define HMC5883L_REG_CFG_B_GN_S   (5)

HMC5883L_REG_CFG_N<7:5> shift.

Definition at line 62 of file hmc5883l_regs.h.

◆ HMC5883L_REG_ID_A

#define HMC5883L_REG_ID_A   (0x0a)

Definition at line 48 of file hmc5883l_regs.h.

◆ HMC5883L_REG_ID_B

#define HMC5883L_REG_ID_B   (0x0b)

Definition at line 49 of file hmc5883l_regs.h.

◆ HMC5883L_REG_ID_C

#define HMC5883L_REG_ID_C   (0x0c)

Definition at line 50 of file hmc5883l_regs.h.

◆ HMC5883L_REG_MODE

#define HMC5883L_REG_MODE   (0x02)

Definition at line 40 of file hmc5883l_regs.h.

◆ HMC5883L_REG_MODE_HS

#define HMC5883L_REG_MODE_HS   (0x80)

HMC5883L_REG_MODE<7>

Definition at line 64 of file hmc5883l_regs.h.

◆ HMC5883L_REG_MODE_MD

#define HMC5883L_REG_MODE_MD   (0x03)

HMC5883L_REG_MODE<1:0>

Definition at line 65 of file hmc5883l_regs.h.

◆ HMC5883L_REG_OUT_X_LSB

#define HMC5883L_REG_OUT_X_LSB   (0x04)

Definition at line 42 of file hmc5883l_regs.h.

◆ HMC5883L_REG_OUT_X_MSB

#define HMC5883L_REG_OUT_X_MSB   (0x03)

Definition at line 41 of file hmc5883l_regs.h.

◆ HMC5883L_REG_OUT_Y_LSB

#define HMC5883L_REG_OUT_Y_LSB   (0x06)

Definition at line 44 of file hmc5883l_regs.h.

◆ HMC5883L_REG_OUT_Y_MSB

#define HMC5883L_REG_OUT_Y_MSB   (0x05)

Definition at line 43 of file hmc5883l_regs.h.

◆ HMC5883L_REG_OUT_Z_LSB

#define HMC5883L_REG_OUT_Z_LSB   (0x08)

Definition at line 46 of file hmc5883l_regs.h.

◆ HMC5883L_REG_OUT_Z_MSB

#define HMC5883L_REG_OUT_Z_MSB   (0x07)

Definition at line 45 of file hmc5883l_regs.h.

◆ HMC5883L_REG_STATUS

#define HMC5883L_REG_STATUS   (0x09)

Definition at line 47 of file hmc5883l_regs.h.

◆ HMC5883L_REG_STATUS_LOCK

#define HMC5883L_REG_STATUS_LOCK   (0x02)

HMC5883L_REG_STATUS<1>

Definition at line 67 of file hmc5883l_regs.h.

◆ HMC5883L_REG_STATUS_RDY

#define HMC5883L_REG_STATUS_RDY   (0x01)

HMC5883L_REG_STATUS<0>

Definition at line 68 of file hmc5883l_regs.h.