nrfcxx
0.1.0
C++-17 Framework for Nordic nRF5 Devices
|
Go to the documentation of this file. 8 #ifndef NRFCXX_SENSOR_LPS22HB_HPP 9 #define NRFCXX_SENSOR_LPS22HB_HPP 113 return observations_;
162 int odr (uint8_t dr);
175 iface_config_type& ifc,
176 unsigned int addr = 0);
181 return nrf5::GPIO->IN & (1U << iface_config_.
drdy_psel);
196 int lpsm_process_ (
int& delay,
197 process_flags_type& pf)
override;
201 iface_config_type& iface_config_;
202 observations_type observations_{};
205 uint16_t lost_drdy_ = 0;
On-demand observations.
Definition: lps22hb.hpp:125
Observations generated at 50 Hz.
Definition: lps22hb.hpp:137
bool drdy_asserted() const
Programmatic test for whether DRDY is asserted.
Definition: lps22hb.hpp:179
int16_t temperature_cCel
A recently retrieved valid temperature or INVALID_TEMPHUMID.
Definition: lps22hb.hpp:107
Information required to communicate with a sensor instance.
Definition: lps22hb.hpp:44
Observations generated at 25 Hz.
Definition: lps22hb.hpp:134
Observations generated at 75 Hz.
Definition: lps22hb.hpp:140
ODR_e
Bit field values in CTRL_REG1 for observation data rate.
Definition: lps22hb.hpp:120
int lpsm_sample() override
Post-extend to signal machine if start failed due to undetected drdy.
static constexpr uint16_t INVALID_TEMPHUMID
Value used for invalid temperature and humidity observations.
Definition: lps22hb.hpp:91
Material supporting low-power-mode operations.
Object used to manage sense callbacks.
Definition: periph.hpp:854
unsigned int pressure_cPa
A recently retrieved valid pressure or INVALID_PRESSURE.
Definition: lps22hb.hpp:103
Wrapper around the nRF51 TWI peripheral.
Definition: periph.hpp:1528
uint16_t lost_drdy() const
Count of the number of times a DRDY signal was detected to be lost.
Definition: lps22hb.hpp:190
STATUS_REG_e
Bit fields in the LPS22HB STATUS_REG register.
Definition: lps22hb.hpp:75
periph::TWI & twi
Reference to TWI device used to communicate with sensor.
Definition: lps22hb.hpp:47
const observations_type & observations() const
Access the most recent completed observation.
Definition: lps22hb.hpp:111
Value when all expected data is available.
Definition: lps22hb.hpp:84
int status() const
Return the value of the STATUS register.
static constexpr auto ODR_DEFAULT
The default output data rate.
Definition: lps22hb.hpp:144
Structure used to convey information about pin levels to sense_listener callbacks.
Definition: periph.hpp:672
Observations generated at 10 Hz.
Definition: lps22hb.hpp:131
Bit set to indicate that new temperature data is available.
Definition: lps22hb.hpp:81
uint8_t odr() const
Retrieve the configured output data rate.
Definition: lps22hb.hpp:151
static constexpr unsigned int INVALID_PRESSURE
Value used for invalid pressure observations.
Definition: lps22hb.hpp:97
Observations generated at 1 Hz.
Definition: lps22hb.hpp:128
uint8_t address
The I2C address used to communicate with the device.
Definition: lps22hb.hpp:60
std::function< void()> notifier_type
Type used to hold a notifier.
Definition: core.hpp:514
Bit set to indicate that new pressure data is available.
Definition: lps22hb.hpp:78
Base (or mixin) class for anything that supports a state_machine.
Definition: lpm.hpp:426
lps22hb(notifier_type notify, iface_config_type &ifc, unsigned int addr=0)
Instantiate the device.
Structure used to return sampled values.
Definition: lps22hb.hpp:100
int8_t drdy_psel
GPIO pin selector usable for interrupt-driven notification of available measurements.
Definition: lps22hb.hpp:54
Primary namespace for nrfcxx functionality.
Definition: clock.hpp:17
const iface_config_type & iface_config() const
Access the interface configuration for the sensor.
Definition: lps22hb.hpp:69
Interface to the ST LPS22HB piezzoresistave absolute pressure sensor.
Definition: lps22hb.hpp:36