242 uint8_t output, uint8_t value);
Low-level GPIO peripheral driver interface definitions.
void adxl345_set_autosleep(const adxl345_t *dev)
Set autosleep mode.
void adxl345_set_bandwidth_rate(const adxl345_t *dev, uint8_t bw_rate)
Set bandwidth rate.
void adxl345_set_interrupt(const adxl345_t *dev)
set ADXL345's interrupts configuration
void adxl345_set_measure(const adxl345_t *dev)
set ADXL345's measure mode
void adxl345_read(const adxl345_t *dev, adxl345_data_t *data)
Read accelerometer's data.
int adxl345_init(adxl345_t *dev, const adxl345_params_t *params)
Initialize the ADXL345 accelerometer driver.
void adxl345_set_fifo_mode(const adxl345_t *dev, uint8_t mode, uint8_t output, uint8_t value)
Set fifo mode with its configuration.
void adxl345_set_sleep(const adxl345_t *dev)
Set sleep mode.
void adxl345_set_standby(const adxl345_t *dev)
Set standby mode.
@ ADXL345_ADDR_1D
I2C device address if Alt addr pin is high.
@ ADXL345_ADDR_53
I2C device address if Alt addr pin is low.
@ ADXL345_RATE_0HZ78
0.78 Hz Output Data Rate
@ ADXL345_RATE_200HZ
200 Hz Output Data Rate
@ ADXL345_RATE_0HZ1
0.1 Hz Output Data Rate
@ ADXL345_RATE_25HZ
25 Hz Output Data Rate
@ ADXL345_RATE_400HZ
400 Hz Output Data Rate
@ ADXL345_RATE_0HZ2
0.2 Hz Output Data Rate
@ ADXL345_RATE_12HZ50
12.5 Hz Output Data Rate
@ ADXL345_RATE_3200HZ
3200 Hz Output Data Rate
@ ADXL345_RATE_3HZ13
3.13 Hz Output Data Rate
@ ADXL345_RATE_1600HZ
1600 Hz Output Data Rate
@ ADXL345_RATE_1HZ56
1.56 Hz Output Data Rate
@ ADXL345_RATE_6HZ25
6.25 Hz Output Data Rate
@ ADXL345_RATE_0HZ39
0.39 Hz Output Data Rate
@ ADXL345_RATE_100HZ
100 Hz Output Data Rate
@ ADXL345_RATE_50HZ
50 Hz Output Data Rate
@ ADXL345_RATE_800HZ
800 Hz Output Data Rate
@ ADXL345_DATA_READY
new data ready to be read
@ ADXL345_OK
everything was fine
@ ADXL345_NODATA
no data available
@ ADXL345_NODEV
no ADXL345 device found on the bus
@ ADXL345_NOI2C
I2C communication failed.
@ ADXL345_TRIGGER
FIFO trigger mode.
@ ADXL345_BYPASS
FIFO bypass mode.
@ ADXL345_STREAM
FIFO stream mode.
@ ADXL345_AUTOSLEEP_MODE
Autosleep mode.
@ ADXL345_MEASURE_MODE
Measure mode.
@ ADXL345_STANDBY_MODE
Standby mode.
@ ADXL345_SLEEP_MODE
Sleep mode.
@ ADXL345_RANGE_8G
+/- 8 g Full Scale Range
@ ADXL345_RANGE_2G
+/- 2 g Full Scale Range
@ ADXL345_RANGE_16G
+/- 16 g Full Scale Range
@ ADXL345_RANGE_4G
+/- 4 g Full Scale Range
@ ADXL345_INT2
Output interrupt on INT2 pin.
@ ADXL345_INT1
Output interrupt on INT1 pin.
uint_fast8_t i2c_t
Default i2c_t type definition.
Low-level I2C peripheral driver interface definition.
ADXL345 result vector struct.
int16_t y
Y-Axis measurement result.
int16_t x
X-Axis measurement result.
int16_t z
Z-Axis measurement result.
Interrupt configuration struct for the ADXL345 sensor.
uint8_t time_ff
Time threshold.
uint8_t tap_axes
Axis control for single tap/double tap.
uint8_t thres_inact
Inactivity threshold.
uint8_t thres_tap
Tap threshold.
uint8_t thres_latent
Tap latency.
uint8_t enable
Interrupt enable control.
uint8_t time_inact
Inactivity time.
uint8_t thres_dur
Tap duration.
uint8_t map
Interrupt mapping control.
uint8_t thres_window
Tap window.
uint8_t thres_ff
Free-fall threshold.
uint8_t source
Source of interrupts.
uint8_t act_inact
Enable ctrl for activity/inactivity detection.
uint8_t thres_act
Activity threshold.
Configuration struct for the ADXL345 sensor.
i2c_t i2c
I2C device which is used.
uint8_t range
Sensitivity configuration.
uint8_t rate
Configured sample rate for accel
uint8_t full_res
Resolution bit.
gpio_t int2
accelerometer int2 pin
gpio_t int1
accelerometer int1 pin
Device descriptor for the ADXL345 sensor.
adxl345_interrupt_t interrupt
Interrupts configuration
adxl345_params_t params
Device configuration.
int16_t scale_factor
Scale factor for converting value to mg.