Skip to content

Commit fec49da

Browse files
authored
Merge pull request #14 from adafruit/doxy-fix
Fixed doxygen index page
2 parents bbf8504 + 6582bb8 commit fec49da

File tree

2 files changed

+71
-50
lines changed

2 files changed

+71
-50
lines changed

Adafruit_LSM9DS0.cpp

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,29 @@
1-
/***************************************************************************
2-
This is a library for the LSM9DS0 Accelerometer and magnentometer/compass
3-
4-
Designed specifically to work with the Adafruit LSM9DS0 Breakouts
5-
6-
These sensors use I2C to communicate, 2 pins are required to interface.
7-
8-
Adafruit invests time and resources providing this open source code,
9-
please support Adafruit andopen-source hardware by purchasing products
10-
from Adafruit!
11-
12-
Written by Kevin Townsend for Adafruit Industries.
13-
BSD license, all text above must be included in any redistribution
14-
***************************************************************************/
1+
/*!
2+
* @file Adafruit_LSM9DS0.cpp
3+
*
4+
* @mainpage Adafruit LSM9DS0 Accelerometer
5+
*
6+
* @section intro_sec Introduction
7+
*
8+
* This is a library for the LSM9DS0 Accelerometer and magnentometer/compass
9+
*
10+
* Designed specifically to work with the Adafruit LSM9DS0 Breakouts
11+
*
12+
* These sensors use I2C to communicate, 2 pins are required to interface.
13+
*
14+
* Adafruit invests time and resources providing this open source code,
15+
* please support Adafruit andopen-source hardware by purchasing products
16+
* from Adafruit!
17+
*
18+
* @section author Author
19+
*
20+
* Written by Kevin Townsend for Adafruit Industries.
21+
*
22+
* @section license License
23+
*
24+
* BSD license, all text above must be included in any redistribution
25+
*
26+
*/
1527
#include <Adafruit_LSM9DS0.h>
1628

1729
/***************************************************************************

Adafruit_LSM9DS0.h

Lines changed: 45 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
1-
/***************************************************************************
2-
This is a library for the LSM9DS0 Accelerometer and magnentometer/compass
1+
/*!
2+
* @file Adafruit_LSM9DS0.h
3+
*
4+
*/
35

4-
Designed specifically to work with the Adafruit LSM9DS0 Breakouts
5-
6-
These sensors use I2C to communicate, 2 pins are required to interface.
7-
8-
Adafruit invests time and resources providing this open source code,
9-
please support Adafruit andopen-source hardware by purchasing products
10-
from Adafruit!
11-
12-
Written by Kevin Townsend for Adafruit Industries.
13-
BSD license, all text above must be included in any redistribution
14-
***************************************************************************/
156
#ifndef __LSM9DS0_H__
167
#define __LSM9DS0_H__
178

@@ -24,34 +15,47 @@
2415
#include <Adafruit_Sensor.h>
2516
#include <SPI.h>
2617

27-
#define LSM9DS0_ADDRESS_ACCELMAG (0x1D) // 3B >> 1 = 7bit default
28-
#define LSM9DS0_ADDRESS_GYRO (0x6B) // D6 >> 1 = 7bit default
29-
#define LSM9DS0_XM_ID (0b01001001)
30-
#define LSM9DS0_G_ID (0b11010100)
18+
#define LSM9DS0_ADDRESS_ACCELMAG (0x1D) //!< 3B >> 1 = 7bit default
19+
#define LSM9DS0_ADDRESS_GYRO (0x6B) //!< D6 >> 1 = 7bit default
20+
#define LSM9DS0_XM_ID \
21+
(0b01001001) //!< Accelerometer & magnetometer ID register, WHO_AM_I_XM
22+
#define LSM9DS0_G_ID (0b11010100) //!< Gyroscope ID register, WHO_AM_I_G
3123

3224
// Linear Acceleration: mg per LSB
33-
#define LSM9DS0_ACCEL_MG_LSB_2G (0.061F)
34-
#define LSM9DS0_ACCEL_MG_LSB_4G (0.122F)
35-
#define LSM9DS0_ACCEL_MG_LSB_6G (0.183F)
36-
#define LSM9DS0_ACCEL_MG_LSB_8G (0.244F)
37-
#define LSM9DS0_ACCEL_MG_LSB_16G (0.732F) // Is this right? Was expecting 0.488F
25+
#define LSM9DS0_ACCEL_MG_LSB_2G \
26+
(0.061F) //!< Linear acceleration sensitivity FS=+-2g
27+
#define LSM9DS0_ACCEL_MG_LSB_4G \
28+
(0.122F) //!< Linear acceleration sensitivity FS=+-4g
29+
30+
#define LSM9DS0_ACCEL_MG_LSB_6G \
31+
(0.183F) //!< Linear acceleration sensitivity FS=+-6g
32+
#define LSM9DS0_ACCEL_MG_LSB_8G \
33+
(0.244F) //!< Linear acceleration sensitivity FS=+-8g
34+
#define LSM9DS0_ACCEL_MG_LSB_16G \
35+
(0.732F) //!< Linear acceleration sensitivity FS=+-16g
3836

3937
// Magnetic Field Strength: gauss range
40-
#define LSM9DS0_MAG_MGAUSS_2GAUSS (0.08F)
41-
#define LSM9DS0_MAG_MGAUSS_4GAUSS (0.16F)
42-
#define LSM9DS0_MAG_MGAUSS_8GAUSS (0.32F)
43-
#define LSM9DS0_MAG_MGAUSS_12GAUSS (0.48F)
38+
#define LSM9DS0_MAG_MGAUSS_2GAUSS (0.08F) //!< Magnetic sensitivity FS=+-2 gauss
39+
#define LSM9DS0_MAG_MGAUSS_4GAUSS (0.16F) //!< Magnetic sensitivity FS=+-4 gauss
40+
#define LSM9DS0_MAG_MGAUSS_8GAUSS (0.32F) //!< Magnetic sensitivity FS=+-8 gauss
41+
#define LSM9DS0_MAG_MGAUSS_12GAUSS \
42+
(0.48F) //!< Magnetic sensitivity FS=+-12 gauss
4443

4544
// Angular Rate: dps per LSB
46-
#define LSM9DS0_GYRO_DPS_DIGIT_245DPS (0.00875F)
47-
#define LSM9DS0_GYRO_DPS_DIGIT_500DPS (0.01750F)
48-
#define LSM9DS0_GYRO_DPS_DIGIT_2000DPS (0.07000F)
45+
#define LSM9DS0_GYRO_DPS_DIGIT_245DPS \
46+
(0.00875F) //!< Angular rate sensitivity FS=+-245dps
47+
#define LSM9DS0_GYRO_DPS_DIGIT_500DPS \
48+
(0.01750F) //!< Angular rate sensitivity FS=+-500dps
49+
#define LSM9DS0_GYRO_DPS_DIGIT_2000DPS \
50+
(0.07000F) //!< Angular rate sensitivity FS=+-2000dps
4951

5052
// Temperature: LSB per degree celsius
51-
#define LSM9DS0_TEMP_LSB_DEGREE_CELSIUS (8) // 1°C = 8, 25° = 200, etc.
53+
#define LSM9DS0_TEMP_LSB_DEGREE_CELSIUS \
54+
(8) //!< Temperature sensor output change vs. temperature. 1°C = 8, 25° = 200,
55+
//!< etc.
5256

53-
#define GYROTYPE (true)
54-
#define XMTYPE (false)
57+
#define GYROTYPE (true) //!< Used to enable gyroscope device
58+
#define XMTYPE (false) //!< Used to enable accellerometer & magnetometer device
5559

5660
/* Forward reference required for function pointers below. */
5761
class Adafruit_LSM9DS0;
@@ -60,10 +64,15 @@ class Adafruit_LSM9DS0;
6064
* used */
6165
/* by the Adafruit_LSM9DS0::Sensor class to read and retrieve individual
6266
* sensors. */
63-
typedef void (Adafruit_LSM9DS0::*lsm9ds0_read_func)(void);
64-
typedef void (Adafruit_LSM9DS0::*lsm9ds0_get_event_func)(sensors_event_t *,
65-
uint32_t);
66-
typedef void (Adafruit_LSM9DS0::*lsm9ds0_get_sensor_func)(sensor_t *);
67+
typedef void (Adafruit_LSM9DS0::*lsm9ds0_read_func)(
68+
void); //!< Pointer to member functions to read. Used by
69+
//!< Adafruit_LSM9DS0::Sensor class.
70+
typedef void (Adafruit_LSM9DS0::*lsm9ds0_get_event_func)(
71+
sensors_event_t *, uint32_t); //!< Pointer to member functions to get event.
72+
//!< Used by Adafruit_LSM9DS0::Sensor class.
73+
typedef void (Adafruit_LSM9DS0::*lsm9ds0_get_sensor_func)(
74+
sensor_t *); //!< Pointer to member functions to get sensor function. Used
75+
//!< by Adafruit_LSM9DS0::Sensor class.
6776

6877
/**! Interface object for LSM9DS0 9-DoF sensor */
6978
class Adafruit_LSM9DS0 {

0 commit comments

Comments
 (0)