PX4 Firmware
PX4 Autopilot Software http://px4.io
LSM303AGR.cpp File Reference

Driver for the ST LSM303AGR MEMS accelerometer / magnetometer connected via SPI. More...

#include "LSM303AGR.hpp"
#include <px4_platform_common/px4_config.h>
#include <px4_platform_common/defines.h>
#include <ecl/geo/geo.h>
Include dependency graph for LSM303AGR.cpp:

Go to the source code of this file.

Macros

#define DIR_READ   (1<<7)
 
#define DIR_WRITE   (0<<7)
 
#define ADDR_INCREMENT   (1<<6)
 
#define CONVERSION_INTERVAL   (1000000 / 100) /* microseconds */
 
#define LSM303AGR_TIMER_REDUCTION   200
 

Variables

static constexpr uint8_t LSM303AGR_WHO_AM_I_M = 0x40
 

Detailed Description

Driver for the ST LSM303AGR MEMS accelerometer / magnetometer connected via SPI.

NOTE: currently only the mag is implemented

Definition in file LSM303AGR.cpp.

Macro Definition Documentation

◆ ADDR_INCREMENT

#define ADDR_INCREMENT   (1<<6)

Definition at line 49 of file LSM303AGR.cpp.

◆ CONVERSION_INTERVAL

#define CONVERSION_INTERVAL   (1000000 / 100) /* microseconds */

Definition at line 52 of file LSM303AGR.cpp.

Referenced by LSM303AGR::ioctl(), and LSM303AGR::Run().

◆ DIR_READ

#define DIR_READ   (1<<7)

Definition at line 47 of file LSM303AGR.cpp.

Referenced by LSM303AGR::read_reg().

◆ DIR_WRITE

#define DIR_WRITE   (0<<7)

Definition at line 48 of file LSM303AGR.cpp.

Referenced by LSM303AGR::write_reg().

◆ LSM303AGR_TIMER_REDUCTION

#define LSM303AGR_TIMER_REDUCTION   200

Definition at line 62 of file LSM303AGR.cpp.

Variable Documentation

◆ LSM303AGR_WHO_AM_I_M

constexpr uint8_t LSM303AGR_WHO_AM_I_M = 0x40
static

Definition at line 54 of file LSM303AGR.cpp.

Referenced by LSM303AGR::probe().