Loading...
Searching...
No Matches

Register definition for the MAG3110 magnetometer driver. More...

Detailed Description

Register definition for the MAG3110 magnetometer driver.

Author
Johann Fischer j.fis.nosp@m.cher.nosp@m.@phyt.nosp@m.ec.d.nosp@m.e

Definition in file mag3110_reg.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define MAG3110_DR_STATUS   0x00
 Data ready status per axis.
 
#define MAG3110_OUT_X_MSB   0x01
 Bits [15:8] of X measurement.
 
#define MAG3110_OUT_X_LSB   0x02
 Bits [7:0] of X measurement.
 
#define MAG3110_OUT_Y_MSB   0x03
 Bits [15:8] of Y measurement.
 
#define MAG3110_OUT_Y_LSB   0x04
 Bits [7:0] of Y measurement.
 
#define MAG3110_OUT_Z_MSB   0x05
 Bits [15:8] of Z measurement.
 
#define MAG3110_OUT_Z_LSB   0x06
 Bits [7:0] of Z measurement.
 
#define MAG3110_WHO_AM_I   0x07
 Device Identification Register.
 
#define MAG3110_SYSMOD   0x08
 FIFO Status Register.
 
#define MAG3110_OFF_X_MSB   0x09
 Bits [15:8] of user X offset.
 
#define MAG3110_OFF_X_LSB   0x0A
 Bits [7:0] of user X offset.
 
#define MAG3110_OFF_Y_MSB   0x0B
 Bits [15:8] of user Y offset.
 
#define MAG3110_OFF_Y_LSB   0x0C
 Bits [7:0] of user Y offset.
 
#define MAG3110_OFF_Z_MSB   0x0D
 Bits [15:8] of user Z offset.
 
#define MAG3110_OFF_Z_LSB   0x0E
 Bits [7:0] of user Z offset.
 
#define MAG3110_DIE_TEMP   0x0F
 Temperature, signed 8 bits.
 
#define MAG3110_CTRL_REG1   0x10
 Operation modes.
 
#define MAG3110_CTRL_REG2   0x11
 Operation modes.
 
#define MAG3110_DR_STATUS_ZYXOW   (1 << 7)
 
#define MAG3110_DR_STATUS_ZOW   (1 << 6)
 
#define MAG3110_DR_STATUS_YOW   (1 << 5)
 
#define MAG3110_DR_STATUS_XOW   (1 << 4)
 
#define MAG3110_DR_STATUS_ZYXDR   (1 << 3)
 
#define MAG3110_DR_STATUS_ZDR   (1 << 2)
 
#define MAG3110_DR_STATUS_YDR   (1 << 1)
 
#define MAG3110_DR_STATUS_XDR   (1 << 0)
 
#define MAG3110_ID   0xC4
 Device ID.
 
#define MAG3110_SYSMOD_STANDBY   0
 
#define MAG3110_SYSMOD_ACTIVE_RAW   1
 
#define MAG3110_SYSMOD_ACTIVE   2
 
#define MAG3110_CTRL_REG1_DROS_SHIFT   3
 
#define MAG3110_CTRL_REG1_DROS_MASK   0xF8
 
#define MAG3110_CTRL_REG1_DROS(x)
 
#define MAG3110_CTRL_REG1_FR   (1 << 2)
 
#define MAG3110_CTRL_REG1_TM   (1 << 1)
 
#define MAG3110_CTRL_REG1_AC   (1 << 0)
 
#define MAG3110_CTRL_REG2_AUTO_MRST_EN   (1 << 7)
 
#define MAG3110_CTRL_REG2_RAW   (1 << 5)
 
#define MAG3110_CTRL_REG2_MAG_RST   (1 << 4)
 

Macro Definition Documentation

◆ MAG3110_CTRL_REG1

#define MAG3110_CTRL_REG1   0x10

Operation modes.

Definition at line 45 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG1_AC

#define MAG3110_CTRL_REG1_AC   (1 << 0)

Definition at line 69 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG1_DROS

#define MAG3110_CTRL_REG1_DROS (   x)
Value:
(((uint8_t)(((uint8_t)(x))<<MAG3110_CTRL_REG1_DROS_SHIFT))\
&MAG3110_CTRL_REG1_DROS_MASK)

Definition at line 65 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG1_DROS_MASK

#define MAG3110_CTRL_REG1_DROS_MASK   0xF8

Definition at line 64 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG1_DROS_SHIFT

#define MAG3110_CTRL_REG1_DROS_SHIFT   3

Definition at line 63 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG1_FR

#define MAG3110_CTRL_REG1_FR   (1 << 2)

Definition at line 67 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG1_TM

#define MAG3110_CTRL_REG1_TM   (1 << 1)

Definition at line 68 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG2

#define MAG3110_CTRL_REG2   0x11

Operation modes.

Definition at line 46 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG2_AUTO_MRST_EN

#define MAG3110_CTRL_REG2_AUTO_MRST_EN   (1 << 7)

Definition at line 71 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG2_MAG_RST

#define MAG3110_CTRL_REG2_MAG_RST   (1 << 4)

Definition at line 73 of file mag3110_reg.h.

◆ MAG3110_CTRL_REG2_RAW

#define MAG3110_CTRL_REG2_RAW   (1 << 5)

Definition at line 72 of file mag3110_reg.h.

◆ MAG3110_DIE_TEMP

#define MAG3110_DIE_TEMP   0x0F

Temperature, signed 8 bits.

Definition at line 44 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS

#define MAG3110_DR_STATUS   0x00

Data ready status per axis.

Definition at line 29 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_XDR

#define MAG3110_DR_STATUS_XDR   (1 << 0)

Definition at line 55 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_XOW

#define MAG3110_DR_STATUS_XOW   (1 << 4)

Definition at line 51 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_YDR

#define MAG3110_DR_STATUS_YDR   (1 << 1)

Definition at line 54 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_YOW

#define MAG3110_DR_STATUS_YOW   (1 << 5)

Definition at line 50 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_ZDR

#define MAG3110_DR_STATUS_ZDR   (1 << 2)

Definition at line 53 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_ZOW

#define MAG3110_DR_STATUS_ZOW   (1 << 6)

Definition at line 49 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_ZYXDR

#define MAG3110_DR_STATUS_ZYXDR   (1 << 3)

Definition at line 52 of file mag3110_reg.h.

◆ MAG3110_DR_STATUS_ZYXOW

#define MAG3110_DR_STATUS_ZYXOW   (1 << 7)

Definition at line 48 of file mag3110_reg.h.

◆ MAG3110_ID

#define MAG3110_ID   0xC4

Device ID.

Definition at line 57 of file mag3110_reg.h.

◆ MAG3110_OFF_X_LSB

#define MAG3110_OFF_X_LSB   0x0A

Bits [7:0] of user X offset.

Definition at line 39 of file mag3110_reg.h.

◆ MAG3110_OFF_X_MSB

#define MAG3110_OFF_X_MSB   0x09

Bits [15:8] of user X offset.

Definition at line 38 of file mag3110_reg.h.

◆ MAG3110_OFF_Y_LSB

#define MAG3110_OFF_Y_LSB   0x0C

Bits [7:0] of user Y offset.

Definition at line 41 of file mag3110_reg.h.

◆ MAG3110_OFF_Y_MSB

#define MAG3110_OFF_Y_MSB   0x0B

Bits [15:8] of user Y offset.

Definition at line 40 of file mag3110_reg.h.

◆ MAG3110_OFF_Z_LSB

#define MAG3110_OFF_Z_LSB   0x0E

Bits [7:0] of user Z offset.

Definition at line 43 of file mag3110_reg.h.

◆ MAG3110_OFF_Z_MSB

#define MAG3110_OFF_Z_MSB   0x0D

Bits [15:8] of user Z offset.

Definition at line 42 of file mag3110_reg.h.

◆ MAG3110_OUT_X_LSB

#define MAG3110_OUT_X_LSB   0x02

Bits [7:0] of X measurement.

Definition at line 31 of file mag3110_reg.h.

◆ MAG3110_OUT_X_MSB

#define MAG3110_OUT_X_MSB   0x01

Bits [15:8] of X measurement.

Definition at line 30 of file mag3110_reg.h.

◆ MAG3110_OUT_Y_LSB

#define MAG3110_OUT_Y_LSB   0x04

Bits [7:0] of Y measurement.

Definition at line 33 of file mag3110_reg.h.

◆ MAG3110_OUT_Y_MSB

#define MAG3110_OUT_Y_MSB   0x03

Bits [15:8] of Y measurement.

Definition at line 32 of file mag3110_reg.h.

◆ MAG3110_OUT_Z_LSB

#define MAG3110_OUT_Z_LSB   0x06

Bits [7:0] of Z measurement.

Definition at line 35 of file mag3110_reg.h.

◆ MAG3110_OUT_Z_MSB

#define MAG3110_OUT_Z_MSB   0x05

Bits [15:8] of Z measurement.

Definition at line 34 of file mag3110_reg.h.

◆ MAG3110_SYSMOD

#define MAG3110_SYSMOD   0x08

FIFO Status Register.

Definition at line 37 of file mag3110_reg.h.

◆ MAG3110_SYSMOD_ACTIVE

#define MAG3110_SYSMOD_ACTIVE   2

Definition at line 61 of file mag3110_reg.h.

◆ MAG3110_SYSMOD_ACTIVE_RAW

#define MAG3110_SYSMOD_ACTIVE_RAW   1

Definition at line 60 of file mag3110_reg.h.

◆ MAG3110_SYSMOD_STANDBY

#define MAG3110_SYSMOD_STANDBY   0

Definition at line 59 of file mag3110_reg.h.

◆ MAG3110_WHO_AM_I

#define MAG3110_WHO_AM_I   0x07

Device Identification Register.

Definition at line 36 of file mag3110_reg.h.