ChibiOS/EX
1.2.0
|
LIS3MDL MEMS interface module header. More...
#include "ex_compass.h"
Go to the source code of this file.
Data Structures | |
struct | LIS3MDLConfig |
LIS3MDL configuration structure. More... | |
struct | LIS3MDLVMT |
LIS3MDL virtual methods table. More... | |
struct | LIS3MDLDriver |
LIS3MDL 3-axis compass class. More... | |
Macros | |
#define | lis3mdlCompassGetAxesNumber(devp) compassGetAxesNumber(&((devp)->comp_if)) |
Return the number of axes of the BaseCompass. More... | |
#define | lis3mdlCompassReadRaw(devp, axes) compassReadRaw(&((devp)->comp_if), axes) |
Retrieves raw data from the BaseCompass. More... | |
#define | lis3mdlCompassReadCooked(devp, axes) compassReadCooked(&((devp)->comp_if), axes) |
Retrieves cooked data from the BaseCompass. More... | |
#define | lis3mdlCompassSetBias(devp, bp) compassSetBias(&((devp)->comp_if), bp) |
Set bias values for the BaseCompass. More... | |
#define | lis3mdlCompassResetBias(devp) compassResetBias(&((devp)->comp_if)) |
Reset bias values for the BaseCompass. More... | |
#define | lis3mdlCompassSetSensitivity(devp, sp) compassSetSensitivity(&((devp)->comp_if), sp) |
Set sensitivity values for the BaseCompass. More... | |
#define | lis3mdlCompassResetSensitivity(devp) compassResetSensitivity(&((devp)->comp_if)) |
Reset sensitivity values for the BaseCompass. More... | |
#define | lis3mdlCompassSetFullScale(devp, fs) (devp)->vmt->comp_set_full_scale(devp, fs) |
Changes the LIS3MDLDriver compass fullscale value. More... | |
Version identification | |
#define | EX_LIS3MDL_VERSION "1.1.2" |
LIS3MDL driver version string. More... | |
#define | EX_LIS3MDL_MAJOR 1 |
LIS3MDL driver version major number. More... | |
#define | EX_LIS3MDL_MINOR 1 |
LIS3MDL driver version minor number. More... | |
#define | EX_LIS3MDL_PATCH 2 |
LIS3MDL driver version patch number. More... | |
#define | LIS3MDL_COMP_NUMBER_OF_AXES 3U |
LIS3MDL compass subsystem characteristics. More... | |
LIS3MDL communication interfaces related bit masks | |
#define | LIS3MDL_DI_MASK 0xFF |
#define | LIS3MDL_DI(n) (1 << n) |
#define | LIS3MDL_AD_MASK 0x3F |
#define | LIS3MDL_AD(n) (1 << n) |
#define | LIS3MDL_MS (1 << 6) |
#define | LIS3MDL_RW (1 << 7) |
#define | LIS3MDL_SUB_MS (1 << 7) |
LIS3MDL register addresses | |
#define | LIS3MDL_AD_WHO_AM_I 0x0F |
#define | LIS3MDL_AD_CTRL_REG1 0x20 |
#define | LIS3MDL_AD_CTRL_REG2 0x21 |
#define | LIS3MDL_AD_CTRL_REG3 0x22 |
#define | LIS3MDL_AD_CTRL_REG4 0x23 |
#define | LIS3MDL_AD_CTRL_REG5 0x24 |
#define | LIS3MDL_AD_STATUS_REG 0x27 |
#define | LIS3MDL_AD_OUT_X_L 0x28 |
#define | LIS3MDL_AD_OUT_X_H 0x29 |
#define | LIS3MDL_AD_OUT_Y_L 0x2A |
#define | LIS3MDL_AD_OUT_Y_H 0x2B |
#define | LIS3MDL_AD_OUT_Z_L 0x2C |
#define | LIS3MDL_AD_OUT_Z_H 0x2D |
#define | LIS3MDL_AD_TEMP_OUT_L 0x2E |
#define | LIS3MDL_AD_TEMP_OUT_H 0x2F |
#define | LIS3MDL_AD_INT_CFG 0x30 |
#define | LIS3MDL_AD_INT_SOURCE 0x31 |
#define | LIS3MDL_AD_INT_THS_L 0x32 |
#define | LIS3MDL_AD_INT_THS_H 0x33 |
LIS3MDL_CTRL_REG1 register bits definitions | |
#define | LIS3MDL_CTRL_REG1_MASK 0xFF |
#define | LIS3MDL_CTRL_REG1_ST (1 << 0) |
#define | LIS3MDL_CTRL_REG1_FAST_ODR (1 << 1) |
#define | LIS3MDL_CTRL_REG1_DO0 (1 << 2) |
#define | LIS3MDL_CTRL_REG1_DO1 (1 << 3) |
#define | LIS3MDL_CTRL_REG1_DO2 (1 << 4) |
#define | LIS3MDL_CTRL_REG1_OM0 (1 << 5) |
#define | LIS3MDL_CTRL_REG1_OM1 (1 << 6) |
#define | LIS3MDL_CTRL_REG1_TEMP_EN (1 << 7) |
LIS3MDL_CTRL_REG2 register bits definitions | |
#define | LIS3MDL_CTRL_REG2_MASK 0x6C |
#define | LIS3MDL_CTRL_REG2_SOFT_RST (1 << 2) |
#define | LIS3MDL_CTRL_REG2_REBOOT (1 << 3) |
#define | LIS3MDL_CTRL_REG2_FS_MASK 0x60 |
#define | LIS3MDL_CTRL_REG2_FS0 (1 << 5) |
#define | LIS3MDL_CTRL_REG2_FS1 (1 << 6) |
LIS3MDL_CTRL_REG3 register bits definitions | |
#define | LIS3MDL_CTRL_REG3_MASK 0x27 |
#define | LIS3MDL_CTRL_REG3_MD0 (1 << 0) |
#define | LIS3MDL_CTRL_REG3_MD1 (1 << 1) |
#define | LIS3MDL_CTRL_REG3_SIM (1 << 2) |
#define | LIS3MDL_CTRL_REG3_LP (1 << 5) |
LIS3MDL_CTRL_REG4 register bits definitions | |
#define | LIS3MDL_CTRL_REG4_MASK 0x0E |
#define | LIS3MDL_CTRL_REG4_BLE (1 << 1) |
#define | LIS3MDL_CTRL_REG4_OMZ0 (1 << 2) |
#define | LIS3MDL_CTRL_REG4_OMZ1 (1 << 3) |
LIS3MDL_CTRL_REG5 register bits definitions | |
#define | LIS3MDL_CTRL_REG5_MASK 0xC0 |
#define | LIS3MDL_CTRL_REG5_BDU (1 << 6) |
#define | LIS3MDL_CTRL_REG5_FAST_READ (1 << 7) |
Configuration options | |
#define | LIS3MDL_USE_SPI FALSE |
LIS3MDL SPI interface switch. More... | |
#define | LIS3MDL_SHARED_SPI FALSE |
LIS3MDL shared SPI switch. More... | |
#define | LIS3MDL_USE_I2C TRUE |
LIS3MDL I2C interface switch. More... | |
#define | LIS3MDL_SHARED_I2C FALSE |
LIS3MDL shared I2C switch. More... | |
#define | LIS3MDL_USE_ADVANCED FALSE |
LIS3MDL advanced configurations switch. More... | |
Functions | |
void | lis3mdlObjectInit (LIS3MDLDriver *devp) |
Initializes an instance. More... | |
void | lis3mdlStart (LIS3MDLDriver *devp, const LIS3MDLConfig *config) |
Configures and activates LIS3MDL Complex Driver peripheral. More... | |
void | lis3mdlStop (LIS3MDLDriver *devp) |
Deactivates the LIS3MDL Complex Driver peripheral. More... | |
LIS3MDL MEMS interface module header.
Definition in file lis3mdl.h.