ChibiOS
19.1.4
|
LSM303DLHC MEMS interface module header. More...
Go to the source code of this file.
Data Structures | |
struct | LSM303DLHCConfig |
LSM303DLHC configuration structure. More... | |
struct | LSM303DLHCVMT |
LSM303DLHC virtual methods table. More... | |
struct | LSM303DLHCDriver |
LSM303DLHC 6-axis accelerometer/compass class. More... | |
Macros | |
#define | lsm303dlhcAccelerometerGetAxesNumber(devp) accelerometerGetAxesNumber(&((devp)->acc_if)) |
Return the number of axes of the BaseAccelerometer. More... | |
#define | lsm303dlhcAccelerometerReadRaw(devp, axes) accelerometerReadRaw(&((devp)->acc_if), axes) |
Retrieves raw data from the BaseAccelerometer. More... | |
#define | lsm303dlhcAccelerometerReadCooked(devp, axes) accelerometerReadCooked(&((devp)->acc_if), axes) |
Retrieves cooked data from the BaseAccelerometer. More... | |
#define | lsm303dlhcAccelerometerSetBias(devp, bp) accelerometerSetBias(&((devp)->acc_if), bp) |
Set bias values for the BaseAccelerometer. More... | |
#define | lsm303dlhcAccelerometerResetBias(devp) accelerometerResetBias(&((devp)->acc_if)) |
Reset bias values for the BaseAccelerometer. More... | |
#define | lsm303dlhcAccelerometerSetSensitivity(devp, sp) accelerometerSetSensitivity(&((devp)->acc_if), sp) |
Set sensitivity values for the BaseAccelerometer. More... | |
#define | lsm303dlhcAccelerometerResetSensitivity(devp) accelerometerResetSensitivity(&((devp)->acc_if)) |
Reset sensitivity values for the BaseAccelerometer. More... | |
#define | lsm303dlhcAccelerometerSetFullScale(devp, fs) (devp)->vmt->acc_set_full_scale(devp, fs) |
Changes the LSM303DLHCDriver accelerometer fullscale value. More... | |
#define | lsm303dlhcCompassGetAxesNumber(devp) compassGetAxesNumber(&((devp)->comp_if)) |
Return the number of axes of the BaseCompass. More... | |
#define | lsm303dlhcCompassReadRaw(devp, axes) compassReadRaw(&((devp)->comp_if), axes) |
Retrieves raw data from the BaseCompass. More... | |
#define | lsm303dlhcCompassReadCooked(devp, axes) compassReadCooked(&((devp)->comp_if), axes) |
Retrieves cooked data from the BaseCompass. More... | |
#define | lsm303dlhcCompassSetBias(devp, bp) compassSetBias(&((devp)->comp_if), bp) |
Set bias values for the BaseCompass. More... | |
#define | lsm303dlhcCompassResetBias(devp) compassResetBias(&((devp)->comp_if)) |
Reset bias values for the BaseCompass. More... | |
#define | lsm303dlhcCompassSetSensitivity(devp, sp) compassSetSensitivity(&((devp)->comp_if), sp) |
Set sensitivity values for the BaseCompass. More... | |
#define | lsm303dlhcCompassResetSensitivity(devp) compassResetSensitivity(&((devp)->comp_if)) |
Reset sensitivity values for the BaseCompass. More... | |
#define | lsm303dlhcCompassSetFullScale(devp, fs) (devp)->vmt->comp_set_full_scale(devp, fs) |
Changes the LSM303DLHCDriver compass fullscale value. More... | |
Version identification | |
#define | EX_LSM303DLHC_VERSION "1.1.2" |
LSM303DLHC driver version string. More... | |
#define | EX_LSM303DLHC_MAJOR 1 |
LSM303DLHC driver version major number. More... | |
#define | EX_LSM303DLHC_MINOR 1 |
LSM303DLHC driver version minor number. More... | |
#define | EX_LSM303DLHC_PATCH 2 |
LSM303DLHC driver version patch number. More... | |
#define | LSM303DLHC_ACC_NUMBER_OF_AXES 3U |
LSM303DLHC accelerometer subsystem characteristics. More... | |
#define | LSM303DLHC_COMP_NUMBER_OF_AXES 3U |
LSM303DLHC compass subsystem characteristics. More... | |
LSM303DLHC communication interfaces related bit masks | |
#define | LSM303DLHC_DI_MASK 0xFF |
#define | LSM303DLHC_DI(n) (1 << n) |
#define | LSM303DLHC_AD_MASK 0x7F |
#define | LSM303DLHC_AD(n) (1 << n) |
#define | LSM303DLHC_MS (1 << 7) |
LSM303DLHC register addresses | |
#define | LSM303DLHC_AD_ACC_CTRL_REG1 0x20 |
#define | LSM303DLHC_AD_ACC_CTRL_REG2 0x21 |
#define | LSM303DLHC_AD_ACC_CTRL_REG3 0x22 |
#define | LSM303DLHC_AD_ACC_CTRL_REG4 0x23 |
#define | LSM303DLHC_AD_ACC_CTRL_REG5 0x24 |
#define | LSM303DLHC_AD_ACC_CTRL_REG6 0x25 |
#define | LSM303DLHC_AD_ACC_REFERENCE 0x26 |
#define | LSM303DLHC_AD_ACC_STATUS_REG 0x27 |
#define | LSM303DLHC_AD_ACC_OUT_X_L 0x28 |
#define | LSM303DLHC_AD_ACC_OUT_X_H 0x29 |
#define | LSM303DLHC_AD_ACC_OUT_Y_L 0x2A |
#define | LSM303DLHC_AD_ACC_OUT_Y_H 0x2B |
#define | LSM303DLHC_AD_ACC_OUT_Z_L 0x2C |
#define | LSM303DLHC_AD_ACC_OUT_Z_H 0x2D |
#define | LSM303DLHC_AD_ACC_FIFO_CTRL_REG 0x2E |
#define | LSM303DLHC_AD_ACC_FIFO_SRC_REG 0x2F |
#define | LSM303DLHC_AD_ACC_INT1_CFG 0x30 |
#define | LSM303DLHC_AD_ACC_INT1_SRC 0x31 |
#define | LSM303DLHC_AD_ACC_INT1_THS 0x32 |
#define | LSM303DLHC_AD_ACC_INT1_DURATION 0x33 |
#define | LSM303DLHC_AD_ACC_INT2_CFG 0x34 |
#define | LSM303DLHC_AD_ACC_INT2_SRC 0x35 |
#define | LSM303DLHC_AD_ACC_INT2_THS 0x36 |
#define | LSM303DLHC_AD_ACC_INT2_DURATION 0x37 |
#define | LSM303DLHC_AD_ACC_CLICK_CFG 0x38 |
#define | LSM303DLHC_AD_ACC_CLICK_SRC 0x39 |
#define | LSM303DLHC_AD_ACC_CLICK_THS 0x3A |
#define | LSM303DLHC_AD_ACC_TIME_LIMIT 0x3B |
#define | LSM303DLHC_AD_ACC_TIME_LATENCY 0x3C |
#define | LSM303DLHC_AD_ACC_TIME_WINDOW 0x3D |
#define | LSM303DLHC_AD_COMP_CRA_REG 0x00 |
#define | LSM303DLHC_AD_COMP_CRB_REG 0x01 |
#define | LSM303DLHC_AD_COMP_MR_REG 0x02 |
#define | LSM303DLHC_AD_COMP_OUT_X_H 0x03 |
#define | LSM303DLHC_AD_COMP_OUT_X_L 0x04 |
#define | LSM303DLHC_AD_COMP_OUT_Z_H 0x05 |
#define | LSM303DLHC_AD_COMP_OUT_Z_L 0x06 |
#define | LSM303DLHC_AD_COMP_OUT_Y_H 0x07 |
#define | LSM303DLHC_AD_COMP_OUT_Y_L 0x08 |
#define | LSM303DLHC_AD_COMP_SR_REG 0x09 |
#define | LSM303DLHC_AD_COMP_IRA_REG 0x0A |
#define | LSM303DLHC_AD_COMP_IRB_REG 0x0B |
#define | LSM303DLHC_AD_COMP_IRC_REG 0x0C |
#define | LSM303DLHC_AD_COMP_TEMP_OUT_H 0x31 |
#define | LSM303DLHC_AD_COMP_TEMP_OUT_L 0x32 |
LSM303DLHC_CTRL_REG1_A register bits definitions | |
#define | LSM303DLHC_CTRL_REG1_A_MASK 0xFF |
#define | LSM303DLHC_CTRL_REG1_A_XEN (1 << 0) |
#define | LSM303DLHC_CTRL_REG1_A_YEN (1 << 1) |
#define | LSM303DLHC_CTRL_REG1_A_ZEN (1 << 2) |
#define | LSM303DLHC_CTRL_REG1_A_LPEN (1 << 3) |
#define | LSM303DLHC_CTRL_REG1_A_ODR0 (1 << 4) |
#define | LSM303DLHC_CTRL_REG1_A_ODR1 (1 << 5) |
#define | LSM303DLHC_CTRL_REG1_A_ODR2 (1 << 6) |
#define | LSM303DLHC_CTRL_REG1_A_ODR3 (1 << 7) |
LSM303DLHC_CTRL_REG2_A register bits definitions | |
#define | LSM303DLHC_CTRL_REG2_A_MASK 0xFF |
#define | LSM303DLHC_CTRL_REG2_A_HPIS1 (1 << 0) |
#define | LSM303DLHC_CTRL_REG2_A_HPIS2 (1 << 1) |
#define | LSM303DLHC_CTRL_REG2_A_HPCLICK (1 << 2) |
#define | LSM303DLHC_CTRL_REG2_A_FDS (1 << 3) |
#define | LSM303DLHC_CTRL_REG2_A_HPCF1 (1 << 4) |
#define | LSM303DLHC_CTRL_REG2_A_HPCF2 (1 << 5) |
#define | LSM303DLHC_CTRL_REG2_A_HPM0 (1 << 6) |
#define | LSM303DLHC_CTRL_REG2_A_HPM1 (1 << 7) |
LSM303DLHC_CTRL_REG3_A register bits definitions | |
#define | LSM303DLHC_CTRL_REG3_A_MASK 0xFD |
#define | LSM303DLHC_CTRL_REG3_A_I1_OVERRUN (1 << 1) |
#define | LSM303DLHC_CTRL_REG3_A_I1_WTM (1 << 2) |
#define | LSM303DLHC_CTRL_REG3_A_I1_DRDY2 (1 << 3) |
#define | LSM303DLHC_CTRL_REG3_A_I1_DRDY1 (1 << 4) |
#define | LSM303DLHC_CTRL_REG3_A_I1_AOI2 (1 << 5) |
#define | LSM303DLHC_CTRL_REG3_A_I1_AOI1 (1 << 6) |
#define | LSM303DLHC_CTRL_REG3_A_I1_CLICK (1 << 7) |
LSM303DLHC_CTRL_REG4_A register bits definitions | |
#define | LSM303DLHC_CTRL_REG4_A_MASK 0xF9 |
#define | LSM303DLHC_CTRL_REG4_A_SIM (1 << 0) |
#define | LSM303DLHC_CTRL_REG4_A_HR (1 << 3) |
#define | LSM303DLHC_CTRL_REG4_A_FS_MASK 0x30 |
#define | LSM303DLHC_CTRL_REG4_A_FS0 (1 << 4) |
#define | LSM303DLHC_CTRL_REG4_A_FS1 (1 << 5) |
#define | LSM303DLHC_CTRL_REG4_A_BLE (1 << 6) |
#define | LSM303DLHC_CTRL_REG4_A_BDU (1 << 7) |
LSM303DLHC_CTRL_REG5_A register bits definitions | |
#define | LSM303DLHC_CTRL_REG5_A_MASK 0xCF |
#define | LSM303DLHC_CTRL_REG5_A_D4D_INT2 (1 << 0) |
#define | LSM303DLHC_CTRL_REG5_A_LIR_INT2 (1 << 1) |
#define | LSM303DLHC_CTRL_REG5_A_D4D_INT1 (1 << 2) |
#define | LSM303DLHC_CTRL_REG5_A_LIR_INT1 (1 << 3) |
#define | LSM303DLHC_CTRL_REG5_A_FIFO_EN (1 << 6) |
#define | LSM303DLHC_CTRL_REG5_A_BOOT (1 << 7) |
LSM303DLHC_CTRL_REG6_A register bits definitions | |
#define | LSM303DLHC_CTRL_REG6_A_MASK 0xFA |
#define | LSM303DLHC_CTRL_REG6_A_H_LACTIVE (1 << 1) |
#define | LSM303DLHC_CTRL_REG6_A_P2_ACT (1 << 3) |
#define | LSM303DLHC_CTRL_REG6_A_BOOT_I1 (1 << 4) |
#define | LSM303DLHC_CTRL_REG6_A_I2_INT2 (1 << 5) |
#define | LSM303DLHC_CTRL_REG6_A_I2_INT1 (1 << 6) |
#define | LSM303DLHC_CTRL_REG6_A_I2_CLICKEN (1 << 7) |
LSM303DLHC_CRA_REG_M register bits definitions | |
#define | LSM303DLHC_CRA_REG_M_MASK 0x9C |
#define | LSM303DLHC_CRA_REG_M_DO0 (1 << 2) |
#define | LSM303DLHC_CRA_REG_M_DO1 (1 << 3) |
#define | LSM303DLHC_CRA_REG_M_DO2 (1 << 4) |
#define | LSM303DLHC_CRA_REG_M_TEMP_EN (1 << 7) |
LSM303DLHC_CRB_REG_M register bits definitions | |
#define | LSM303DLHC_CRB_REG_M_MASK 0xE0 |
#define | LSM303DLHC_CRB_REG_M_GN_MASK 0xE0 |
#define | LSM303DLHC_CRB_REG_M_GN0 (1 << 5) |
#define | LSM303DLHC_CRB_REG_M_GN1 (1 << 6) |
#define | LSM303DLHC_CRB_REG_M_GN2 (1 << 7) |
#define | LSM303DLHC_MR_REG_M_MASK 0x03 |
#define | LSM303DLHC_MR_REG_M_MD0 (1 << 0) |
#define | LSM303DLHC_MR_REG_M_MD1 (1 << 1) |
Configuration options | |
#define | LSM303DLHC_USE_SPI FALSE |
LSM303DLHC SPI interface switch. More... | |
#define | LSM303DLHC_SHARED_SPI FALSE |
LSM303DLHC shared SPI switch. More... | |
#define | LSM303DLHC_USE_I2C TRUE |
LSM303DLHC I2C interface switch. More... | |
#define | LSM303DLHC_SHARED_I2C FALSE |
LSM303DLHC shared I2C switch. More... | |
#define | LSM303DLHC_USE_ADVANCED FALSE |
LSM303DLHC advanced configurations switch. More... | |
Enumerations | |
LSM303DLHC compass subsystem data structures and types. |
Functions | |
void | lsm303dlhcObjectInit (LSM303DLHCDriver *devp) |
Initializes an instance. More... | |
void | lsm303dlhcStart (LSM303DLHCDriver *devp, const LSM303DLHCConfig *config) |
Configures and activates LSM303DLHC Complex Driver peripheral. More... | |
void | lsm303dlhcStop (LSM303DLHCDriver *devp) |
Deactivates the LSM303DLHC Complex Driver peripheral. More... | |
LSM303DLHC accelerometer subsystem data structures and types. | |
| |
typedef struct LSM303DLHCDriver | LSM303DLHCDriver |
Structure representing a LSM303DLHC driver. More... | |
LSM303DLHC main system data structures and types. | |
#define | _lsm303dlhc_methods_alone |
LSM303DLHC specific methods. More... | |
#define | _lsm303dlhc_methods |
LSM303DLHC specific methods with inherited ones. More... | |
#define | _lsm303dlhc_data |
LSM303DLHCDriver specific data. More... | |
LSM303DLHC MEMS interface module header.
Definition in file lsm303dlhc.h.