114 bool init()
override;
148 bool isInitialized =
false;
Driver for LPS22DF, Low-power and high-precision MEMS pressure sensor.
void setConfig(const Config &config)
Sets and saves the configurations passed on the parameters.
void setOutputDataRate(ODR odr)
Sets and saves the output data rate.
AVG
Oversampling average values.
static SPIBusConfig getDefaultSPIConfig()
LPS22DFData sampleImpl() override
Read a data sample from the sensor. In case of errors, the method should return the last available co...
bool selfTest() override
The self test method returns true if we read the right whoami value. We can't make a better self test...
ODR
Enumeration for Output Data Rate Configuration.
LPS22DF(SPIBusInterface &bus, miosix::GpioPin cs)
Constructor that stores the initial default settings (without applying them to the sensor).
bool init() override
Initializes the sensor with the current settings.
void setAverage(AVG avg)
Sets and saves the oversampling on the sensor.
static PrintLogger getLogger(const string &name)
Interface for low level access of a SPI bus as a master.
Base sensor class with has to be extended by any sensor driver.
This file includes all the types the logdecoder script will decode.
Struct that sums up all the settings of the sensor.
SPI Bus configuration for a specific slave.
Contains information about a single SPI slave device.