tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/mag3110/registers.go (about)

     1  package mag3110
     2  
     3  // Constants/addresses used for I2C.
     4  
     5  // The I2C address which this device listens to.
     6  const Address = 0x0E
     7  
     8  // Registers. Names, addresses and comments are copied from the datasheet.
     9  const (
    10  	DR_STATUS = 0x00 // Data ready status per axis
    11  	OUT_X_MSB = 0x01 // Bits [15:8] of X measurement
    12  	OUT_X_LSB = 0x02 // Bits [7:0] of X measurement
    13  	OUT_Y_MSB = 0x03 // Bits [15:8] of Y measurement
    14  	OUT_Y_LSB = 0x04 // Bits [7:0] of Y measurement
    15  	OUT_Z_MSB = 0x05 // Bits [15:8] of Z measurement
    16  	OUT_Z_LSB = 0x06 // Bits [7:0] of Z measurement
    17  	WHO_AM_I  = 0x07 // Device ID Number
    18  	SYSMOD    = 0x08 // Current System Mode
    19  	OFF_X_MSB = 0x09 // Bits [14:7] of user X offset
    20  	OFF_X_LSB = 0x0A // Bits [6:0] of user X offset
    21  	OFF_Y_MSB = 0x0B // Bits [14:7] of user Y offset
    22  	OFF_Y_LSB = 0x0C // Bits [6:0] of user Y offset
    23  	OFF_Z_MSB = 0x0D // Bits [14:7] of user Z offset
    24  	OFF_Z_LSB = 0x0E // Bits [6:0] of user Z offset
    25  	DIE_TEMP  = 0x0F // Temperature, signed 8 bits in °C
    26  	CTRL_REG1 = 0x10 // Operation modes
    27  	CTRL_REG2 = 0x11 // Operation modes
    28  )