modm API documentation
modm::Lis302dl< Transport > Class Template Reference

#include <modm/driver/inertial/lis302dl.hpp>

Inheritance diagram for modm::Lis302dl< Transport >:

Classes

struct  Data
 

Public Typedefs

typedef FlagsGroup< Control1_t, Control2_t, Control3_t > Control_t
 
typedef FlagsGroup< Control1_t, Control2_t, Control3_t, Status_t, FreeFallConfig_t, FreeFallSource_t, FreeFallThreshold_t, ClickConfig_t, ClickSource_t > Register_t
 

Public Types

enum  Control1 : uint8_t
 CTRL_REG1 default value is 0x07.
 
enum  Control2 : uint8_t
 CTRL_REG2 default value is 0x00.
 
enum  Control3 : uint8_t
 CTRL_REG3 default value is 0x00.
 
enum  Status : uint8_t
 STATUS_REG default value is 0x00.
 
enum  FreeFallConfig : uint8_t
 FF_WU_CFG default value is 0x00.
 
enum  FreeFallSource : uint8_t
 FF_WU_SRC default value is 0x00.
 
enum  FreeFallThreshold : uint8_t
 FF_WU_THS default value is 0x00.
 
enum  ClickConfig : uint8_t
 CLOCK_CFG default value is 0x00.
 
enum  ClickSource : uint8_t
 CLOCK_SRC default value is 0x00.
 
enum  InterruptSource : uint8_t
 
enum  MeasurementRate : uint8_t
 
enum  Scale : uint8_t
 
enum  Interrupt : uint8_t
 
enum  Axis : uint8_t
 

Public Member Functions

 MODM_FLAGS8 (Control1)
 
 MODM_FLAGS8 (Control2)
 
 MODM_FLAGS8 (Control3)
 
 MODM_FLAGS8 (Status)
 
 MODM_FLAGS8 (FreeFallConfig)
 
 MODM_FLAGS8 (FreeFallSource)
 
 MODM_FLAGS8 (FreeFallThreshold)
 
 MODM_FLAGS8 (ClickConfig)
 
 MODM_FLAGS8 (ClickSource)
 
 Lis302dl (Data &data, uint8_t address=0x1D)
 
bool configureBlocking (Scale scale, MeasurementRate rate=MeasurementRate::Hz100)
 
modm::ResumableResult< bool > configure (Scale scale, MeasurementRate rate=MeasurementRate::Hz100)
 
modm::ResumableResult< bool > updateControlRegister (Control1_t setMask, Control1_t clearMask=Control1_t (0xff))
 
modm::ResumableResult< bool > updateControlRegister (Control2_t setMask, Control2_t clearMask=Control2_t (0xff))
 
modm::ResumableResult< bool > updateControlRegister (Control3_t setMask, Control3_t clearMask=Control3_t (0xff))
 
modm::ResumableResult< bool > writeInterruptSource (Interrupt interrupt, InterruptSource source)
 
modm::ResumableResult< bool > updateFreeFallConfiguration (Interrupt interrupt, FreeFallConfig_t setMask, FreeFallConfig_t clearMask=FreeFallConfig_t (0xff))
 
modm::ResumableResult< bool > readFreeFallSource (Interrupt interrupt, FreeFallSource_t &source)
 
modm::ResumableResult< bool > setFreeFallThreshold (Interrupt interrupt, uint8_t threshold)
 
modm::ResumableResult< bool > setFreeFallDuration (Interrupt interrupt, uint8_t duration)
 
modm::ResumableResult< bool > updateClickConfiguration (ClickConfig_t setMask, ClickConfig_t clearMask)
 
modm::ResumableResult< bool > readClickSource (ClickSource_t &source)
 
modm::ResumableResult< bool > setClickThreshold (Axis axis, uint8_t threshold)
 
modm::ResumableResult< bool > setClickTimeLimit (uint8_t limit)
 
modm::ResumableResult< bool > setClickLatency (uint8_t latency)
 
modm::ResumableResult< bool > setClickWindow (uint8_t window)
 
modm::ResumableResult< bool > readAcceleration ()
 
Status_t getStatus ()
 
Control1_t getControl1 ()
 
Control2_t getControl2 ()
 
Control3_t getControl3 ()
 
DatagetData ()
 Get the data object for this sensor.
 

Detailed Description

template<class Transport>
class modm::Lis302dl< Transport >

Template Parameters
TransportEither the I2C or SPI Transport Layer.
See also
Lis3TransportI2c
Lis3TransportSpi
Author
Niklas Hauser

Constructor & Destructor Documentation

template<class Transport >
modm::Lis302dl< Transport >::Lis302dl ( Data data,
uint8_t  address = 0x1D 
)

Constructor, requires a lis302dl::Data object. For I2c this also sets the address to 0x1D (alternative: 0x1C).


The documentation for this class was generated from the following file: