ruuvi.drivers.c
${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
#include "ruuvi_driver_enabled_modules.h"
#include "ruuvi_driver_error.h"
#include "ruuvi_driver_sensor.h"
#include <stdbool.h>
#include <stddef.h>
#include "lis2dh12_reg.h"
Go to the source code of this file.
Data Structures | |
struct | ri_lis2dh12_dev |
context for LIS2DH12 More... | |
Macros | |
#define | RI_LIS2DH12_SELFTEST_DIFF_MIN (17) |
Minimum counts of self-test change in 10 bit resolution 2 G scale, ref datasheet. More... | |
#define | RI_LIS2DH12_SELFTEST_DIFF_MAX (360) |
Maximum counts of self-test change in 10 bit resolution 2 G scale, ref datasheet. More... | |
#define | RI_LIS2DH12_DEFAULT_SCALE (2U) |
Scale used on "default" setting. More... | |
#define | RI_LIS2DH12_DEFAULT_RESOLUTION (10U) |
Resolution used on "default" setting. More... | |
#define | LIS_SUCCESS (0) |
No error in LIS driver. More... | |
#define | SELF_TEST_DELAY_MS (100U) |
At least 3 samples at 400 Hz, but recommended value 100. More... | |
#define | SELF_TEST_SAMPLES_NUM (5) |
5 samples More... | |
Interface for LIS2DH12 basic usage. The underlying platform must provide functions for SPI and/or I2C access, ruuvi_interface_spi_lis2dh12.h.
Testing the interface with ruuvi_driver_sensor_test.h
Definition in file ruuvi_interface_lis2dh12.h.