ChibiOS 21.11.4
lis3mdl.c File Reference

LIS3MDL MEMS interface module code. More...

#include "hal.h"
#include "lis3mdl.h"

Go to the source code of this file.

Functions

msg_t lis3mdlI2CReadRegister (I2CDriver *i2cp, lis3mdl_sad_t sad, uint8_t reg, uint8_t *rxbuf, size_t n)
 Reads registers value using I2C.
msg_t lis3mdlI2CWriteRegister (I2CDriver *i2cp, lis3mdl_sad_t sad, uint8_t *txbuf, uint8_t n)
 Writes a value into a register using I2C.
static size_t comp_get_axes_number (void *ip)
 Return the number of axes of the BaseCompass.
static msg_t comp_read_raw (void *ip, int32_t axes[])
 Retrieves raw data from the BaseCompass.
static msg_t comp_read_cooked (void *ip, float axes[])
 Retrieves cooked data from the BaseCompass.
static msg_t comp_set_bias (void *ip, float *bp)
 Set bias values for the BaseCompass.
static msg_t comp_reset_bias (void *ip)
 Reset bias values for the BaseCompass.
static msg_t comp_set_sensivity (void *ip, float *sp)
 Set sensitivity values for the BaseCompass.
static msg_t comp_reset_sensivity (void *ip)
 Reset sensitivity values for the BaseCompass.
static msg_t comp_set_full_scale (LIS3MDLDriver *devp, lis3mdl_comp_fs_t fs)
 Changes the LIS3MDLDriver compass fullscale value.
void lis3mdlObjectInit (LIS3MDLDriver *devp)
 Initializes an instance.
void lis3mdlStart (LIS3MDLDriver *devp, const LIS3MDLConfig *config)
 Configures and activates LIS3MDL Complex Driver peripheral.
void lis3mdlStop (LIS3MDLDriver *devp)
 Deactivates the LIS3MDL Complex Driver peripheral.

Variables

static const struct LIS3MDLVMT vmt_device
static const struct BaseCompassVMT vmt_compass

Detailed Description

LIS3MDL MEMS interface module code.

Definition in file lis3mdl.c.