Adafruit LSM303DLH Magnetometer Library
Classes | Macros | Typedefs | Enumerations
Adafruit_LSM303DLH_Mag.h File Reference
#include "WProgram.h"
#include <Adafruit_BusIO_Register.h>
#include <Adafruit_I2CDevice.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>

Go to the source code of this file.

Classes

struct  lsm303MagData_s
 INTERNAL ACCELERATION DATA TYPE. More...
 
class  Adafruit_LSM303DLH_Mag_Unified
 Unified sensor driver for the magnetometer. More...
 

Macros

#define _ADDRESS_MAG   0x1E
 I2C Address.
 
#define LSM303_ID   (0b11010100)
 Chip ID.
 

Typedefs

typedef struct lsm303MagData_s lsm303MagData
 INTERNAL ACCELERATION DATA TYPE.
 

Enumerations

enum  lsm303MagRegisters_t {
  LSM303_REGISTER_MAG_CRA_REG_M = 0x00, LSM303_REGISTER_MAG_CRB_REG_M = 0x01, LSM303_REGISTER_MAG_MR_REG_M = 0x02, LSM303_REGISTER_MAG_OUT_X_H_M = 0x03,
  LSM303_REGISTER_MAG_OUT_X_L_M = 0x04, LSM303_REGISTER_MAG_OUT_Z_H_M = 0x05, LSM303_REGISTER_MAG_OUT_Z_L_M = 0x06, LSM303_REGISTER_MAG_OUT_Y_H_M = 0x07,
  LSM303_REGISTER_MAG_OUT_Y_L_M = 0x08, LSM303_REGISTER_MAG_SR_REG_Mg = 0x09, LSM303_REGISTER_MAG_IRA_REG_M = 0x0A, LSM303_REGISTER_MAG_IRB_REG_M = 0x0B,
  LSM303_REGISTER_MAG_IRC_REG_M = 0x0C, LSM303_REGISTER_MAG_TEMP_OUT_H_M = 0x31, LSM303_REGISTER_MAG_TEMP_OUT_L_M = 0x32
}
 I2C bits.
 
enum  lsm303MagGain {
  LSM303_MAGGAIN_1_3, LSM303_MAGGAIN_1_9, LSM303_MAGGAIN_2_5, LSM303_MAGGAIN_4_0,
  LSM303_MAGGAIN_4_7, LSM303_MAGGAIN_5_6, LSM303_MAGGAIN_8_1
}
 Magnetometer gain settings.
 
enum  lsm303MagRate {
  LSM303_MAGRATE_0_7, LSM303_MAGRATE_1_5, LSM303_MAGRATE_3_0, LSM303_MAGRATE_7_5,
  LSM303_MAGRATE_15, LSM303_MAGRATE_30, LSM303_MAGRATE_75, LSM303_MAGRATE_220
}
 Magnetometer update rate settings.