Skip to content

Commit

Permalink
Merge pull request #5 from adafruit/doxy-fix
Browse files Browse the repository at this point in the history
Fixed doxygen index page
  • Loading branch information
siddacious authored Jun 1, 2020
2 parents 144e8fc + 7b1d4fa commit cfbbbd5
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 39 deletions.
41 changes: 27 additions & 14 deletions Adafruit_LIS2MDL.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
/***************************************************************************
This is a library for the LIS2MDL Magnentometer/compass
Designed specifically to work with the Adafruit LSM303AGR and LIS2MDL
Breakouts
These displays use I2C to communicate, 2 pins are required to interface.
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing products
from Adafruit!
/*!
* @file Adafruit_LIS2MDL.cpp
*
* @mainpage Adafruit LIS2MDL Breakout
*
* @section intro_sec Introduction
*
* This is a library for the LIS2MDL Magnentometer/compass
*
* Designed specifically to work with the Adafruit LSM303AGR and LIS2MDL
* Breakouts
*
* These displays use I2C to communicate, 2 pins are required to interface.
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing products
* from Adafruit!
*
* @section author Author
*
* Written by Bryan Siepert for Adafruit Industries.
*
* @section license License
*
* BSD license, all text above must be included in any redistribution
*
*/

Written by Bryan Siepert for Adafruit Industries.
BSD license, all text above must be included in any redistribution
***************************************************************************/
#if ARDUINO >= 100
#include "Arduino.h"
#else
Expand Down
57 changes: 32 additions & 25 deletions Adafruit_LIS2MDL.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
/***************************************************************************
This is a library for the LIS2MDL magnentometer/compass
Designed specifically to work with the Adafruit LSM303AGR and LIS2MDL
Breakouts
These displays use I2C to communicate, 2 pins are required to interface.
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing products
from Adafruit!
/*!
* @file Adafruit_LIS2MDL.h
*
* This is a library for the LIS2MDL magnentometer/compass
*
* Designed specifically to work with the Adafruit LSM303AGR and LIS2MDL
* Breakouts
*
* These displays use I2C to communicate, 2 pins are required to interface.
*
* Adafruit invests time and resources providing this open source code,
* please support Adafruit and open-source hardware by purchasing products
* from Adafruit!
*
* Written by Bryan Siepert for Adafruit Industries.
* BSD license, all text above must be included in any redistribution
*/

Written by Bryan Siepert for Adafruit Industries.
BSD license, all text above must be included in any redistribution
***************************************************************************/
#ifndef LIS2MDL_MAG_H
#define LIS2MDL_MAG_H

Expand All @@ -26,12 +29,16 @@
/*=========================================================================
I2C ADDRESS/BITS
-----------------------------------------------------------------------*/
#define _ADDRESS_MAG 0x1E //< Default address
#define _CHIP_ID 0x40 //< Chip ID from WHO_AM_I register
#define LIS2MDL_MAG_LSB 1.5
#define LIS2MDL_MILLIGAUSS_TO_MICROTESLA 0.1
#define _ADDRESS_MAG 0x1E //!< Default address
#define _CHIP_ID 0x40 //!< Chip ID from WHO_AM_I register
#define LIS2MDL_MAG_LSB 1.5 //!< Sensitivity
#define LIS2MDL_MILLIGAUSS_TO_MICROTESLA \
0.1 //!< Conversion rate of Milligauss to Microtesla
/*=========================================================================*/

/*!
* @brief LIS2MDL I2C register address bits
*/
typedef enum {
LIS2MDL_OFFSET_X_REG_L = 0x45,
LIS2MDL_OFFSET_X_REG_H = 0x46,
Expand All @@ -56,14 +63,14 @@ typedef enum {
} lis2mdl_register_t;
/*=========================================================================*/

/*=========================================================================
MAGNETOMETER UPDATE RATE SETTINGS
-----------------------------------------------------------------------*/
/*!
* @brief Magnetometer update rate settings
*/
typedef enum {
LIS2MDL_RATE_10_HZ, //< 10 Hz
LIS2MDL_RATE_20_HZ, //< 20 Hz
LIS2MDL_RATE_50_HZ, //< 50 Hz
LIS2MDL_RATE_100_HZ, //< 100 Hz
LIS2MDL_RATE_10_HZ, //!< 10 Hz
LIS2MDL_RATE_20_HZ, //!< 20 Hz
LIS2MDL_RATE_50_HZ, //!< 50 Hz
LIS2MDL_RATE_100_HZ, //!< 100 Hz
} lis2mdl_rate_t;
/*=========================================================================*/

Expand Down

0 comments on commit cfbbbd5

Please sign in to comment.