Analog Devices ADXL355 Component
Installation
The component requires ESP-IDF 5.3 and higher and is installed using IDF Component Manager.
Add this to the idf_component.yml
in the project main
directory or in the component directory:
dependencies:
plasmapper/pl_adxl355: "^1.0.0"
Add this to the source code:
#include "pl_adxl355.h"
Add extern "C"
to the app_main
function:
extern "C" void app_main(void) {...}
Add this to the sdkconfig.defaults
in the project directory or configure the values using Project Configuration:
CONFIG_COMPILER_CXX_RTTI=y
Functions
Initialization
Range Configuration and Scale Factor
PL::Adxl355::ReadRange()
, PL::Adxl355::SetRange()
, PL::Adxl355::ReadAccelerationScaleFactor()
.
Measurement Frequency Configuration
PL::Adxl355::ReadOutputDataRate()
, PL::Adxl355::SetOutputDataRate()
.
Measurement Enable/Disable
Use PL::Adxl355::EnableMeasurement()
, PL::Adxl355::DisableMeasurement()
,
PL::Adxl355::IsMeasurementEnabled()
.
Single Measurement
PL::Adxl355::ReadAccelerations()
/PL::Adxl355::ReadRawAccelerations()
.
Waveform Measurement
PL::Adxl355::ReadNumberOfFifoSamples()
, PL::Adxl355::ClearFifo()
,
PL::Adxl355::ReadAccelerationsFromFifo()
/PL::Adxl355::ReadRawAccelerationsFromFifo()
.
Offset Configuration
PL::Adxl355::ReadOffsets()
/PL::Adxl355::ReadRawOffsets()
,
PL::Adxl355::SetOffsets()
/PL::Adxl355::SetRawOffsets()
.
Activity Detection
PL::Adxl355::ReadActivityDetectionAxes()
, PL::Adxl355::SetActivityDetectionAxes()
,
PL::Adxl355::ReadActivityDetectionThreshold()
/PL::Adxl355::ReadRawActivityDetectionThreshold()
,
PL::Adxl355::SetActivityDetectionThreshold()
/PL::Adxl355::SetRawActivityDetectionThreshold()
,
PL::Adxl355::ReadActivityDetectionCount()
, PL::Adxl355::SetActivityDetectionCount()
.
Temperature Measurement
PL::Adxl355::EnableTemperature()
, PL::Adxl355::DisableTemperature()
,
PL::Adxl355::IsTemperatureEnabled()
,
PL::Adxl355::ReadTemperature()
/PL::Adxl355::ReadRawTemperature()
.
Interrupt Configuration
PL::Adxl355::ReadInterrupts()
, PL::Adxl355::SetInterrupts()
.
Device Information and Status
Self-test and Reset
Other
PL::Adxl355::ReadHpfFrequency()
, PL::Adxl355::SetHpfFrequency()
,
PL::Adxl355::ReadFifoWatermark()
, PL::Adxl355::SetFifoWatermark()
,
PL::Adxl355::ReadSynchronization()
, PL::Adxl355::SetSynchronization()
,
PL::Adxl355::EnableExternalClock()
, PL::Adxl355::DisableExternalClock()
,
PL::Adxl355::IsExternalClockEnabled()
PL::Adxl355::ReadInterruptPolarity()
, PL::Adxl355::SetInterruptPolarity()
,
PL::Adxl355::ReadI2CSpeed()
, PL::Adxl355::SetI2CSpeed()
,
PL::Adxl355::EnableDataReady()
, PL::Adxl355::DisableDataReady()
,
PL::Adxl355::IsDataReadyEnabled()
.
Thread safety
Class method thread safety is implemented by having the PL::Lockable
as a base class and creating the class object lock guard at the beginning of the methods.
PL::Adxl355::Initialize()
and all transaction methods lock both
the PL::Adxl355
and the PL::Spi
objects for the duration of the method.
Examples
API reference
- PL::Adxl355 class
PL::Adxl355
Adxl355()
Lock()
Unlock()
Initialize()
ReadDeviceInfo()
ReadStatus()
ReadNumberOfFifoSamples()
ReadRawTemperature()
ReadTemperature()
ReadRawAccelerations()
ReadAccelerations()
ClearFifo()
ReadRawAccelerationsFromFifo()
ReadAccelerationsFromFifo()
ReadRawOffsets()
ReadOffsets()
SetRawOffsets()
SetOffsets()
ReadActivityDetectionAxes()
SetActivityDetectionAxes()
ReadRawActivityDetectionThreshold()
ReadActivityDetectionThreshold()
SetRawActivityDetectionThreshold()
SetActivityDetectionThreshold()
ReadActivityDetectionCount()
SetActivityDetectionCount()
ReadHpfFrequency()
SetHpfFrequency()
ReadOutputDataRate()
SetOutputDataRate()
ReadFifoWatermark()
SetFifoWatermark()
ReadInterrupts()
SetInterrupts()
ReadSynchronization()
SetSynchronization()
EnableExternalClock()
DisableExternalClock()
IsExternalClockEnabled()
ReadRange()
ReadAccelerationScaleFactor()
SetRange()
ReadInterruptPolarity()
SetInterruptPolarity()
ReadI2CSpeed()
SetI2CSpeed()
EnableMeasurement()
DisableMeasurement()
IsMeasurementEnabled()
EnableTemperature()
DisableTemperature()
IsTemperatureEnabled()
EnableDataReady()
DisableDataReady()
IsDataReadyEnabled()
SelfTest()
Reset()
defaultSpiFrequency
temperatureInterceptLsb
temperatureInterceptDegC
temperatureSlope
accelerationScaleFactorRange2G
accelerationScaleFactorRange4G
accelerationScaleFactorRange8G
maxNumberOfFifoSamples