M5Unit-HEART 0.0.2 git rev:70607f7
|
Pulse oximetry and heart-rate sensor. More...
#include <unit_MAX30100.hpp>
Classes | |
struct | config_t |
Settings for begin. More... | |
Public Member Functions | |
UnitMAX30100 (const uint8_t addr=DEFAULT_ADDRESS) | |
virtual bool | begin () override |
virtual void | update (const bool force=false) override |
bool | resetFIFO () |
Reset FIFO buffer. | |
bool | reset () |
Reset. | |
Settings for begin | |
config_t | config () |
Gets the configration. | |
void | config (const config_t &cfg) |
Set the configration. | |
Measurement data by periodic | |
uint16_t | ir () const |
Oldest IR. | |
uint16_t | red () const |
Oldest Red. | |
uint8_t | retrived () const |
Number of data last retrieved. | |
uint8_t | overflow () const |
The number of samples lost. | |
Periodic measurement | |
bool | startPeriodicMeasurement () |
Start periodic measurement in the current settings. | |
bool | startPeriodicMeasurement (const max30100::Mode mode, const max30100::Sampling sample_rate, const max30100::LedPulseWidth pulse_width, const max30100::CurrentControl ir_current, const bool high_resolution=false, const max30100::CurrentControl red_current=max30100::CurrentControl::mA0_0) |
Start periodic measurement. | |
bool | stopPeriodicMeasurement () |
Stop periodic measurement. | |
Mode Configuration | |
| |
bool | readModeConfiguration (max30100::ModeConfiguration &mc) |
Read Mode configuration. | |
bool | writeModeConfiguration (const max30100::ModeConfiguration mc) |
Write Mode configuration. | |
bool | writeMode (const max30100::Mode mode) |
Write Mode. | |
bool | writePowerSaveEnable () |
Write power save mode to enable. | |
bool | writePowerSaveDisable () |
Write power save mode to disable. | |
SpO2 Configuration | |
| |
bool | readSpO2Configuration (max30100::SpO2Configuration &sc) |
Read SpO2 configrartion. | |
bool | writeSpO2Configuration (const max30100::SpO2Configuration sc) |
Write SpO2 configrartion. | |
bool | writeSamplingRate (const max30100::Sampling rate) |
Write sample rate. | |
bool | writeLedPulseWidth (const max30100::LedPulseWidth width) |
Write LED pulse width. | |
bool | writeHighResolutionEnable () |
Writee SpO2 high resolution mode to enable. | |
bool | writeHighResolutionDisable () |
Write SpO2 high resolution mode to disable. | |
LED Configuration | |
| |
bool | readLedConfiguration (max30100::LedConfiguration &lc) |
Read Led configrartion. | |
bool | writeLedConfiguration (const max30100::LedConfiguration lc) |
Write Led configrartion. | |
bool | writeLedCurrent (const max30100::CurrentControl ir, const max30100::CurrentControl red) |
Write IR/RED current. | |
Measurement temperature | |
| |
bool | measureTemperatureSingleshot (max30100::TemperatureData &td) |
Measure tempeature single shot. | |
Protected Member Functions | |
bool | start_periodic_measurement () |
bool | start_periodic_measurement (const max30100::Mode mode, const max30100::Sampling sample_rate, const max30100::LedPulseWidth pulse_width, const max30100::CurrentControl ir_current, const bool high_resolution, const max30100::CurrentControl red_current) |
bool | stop_periodic_measurement () |
bool | read_FIFO () |
bool | read_measurement_temperature (max30100::TemperatureData &td) |
M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitMAX30100, max30100::Data) | |
bool | read_mode_configration (uint8_t &c) |
bool | write_mode_configration (const uint8_t c) |
bool | enable_power_save (const bool enabled) |
bool | read_spo2_configration (uint8_t &c) |
bool | write_spo2_configration (const uint8_t c) |
bool | enable_high_resolution (const bool enabled) |
bool | read_led_configration (uint8_t &c) |
bool | write_led_configration (const uint8_t c) |
bool | read_register (const uint8_t reg, uint8_t *buf, const size_t len) |
bool | read_register8 (const uint8_t reg, uint8_t &v) |
Protected Attributes | |
max30100::Mode | _mode {max30100::Mode::None} |
uint8_t | _retrived {} |
uint8_t | _overflow {} |
std::unique_ptr< m5::container::CircularBuffer< max30100::Data > > | _data {} |
config_t | _cfg {} |
Pulse oximetry and heart-rate sensor.
bool m5::unit::UnitMAX30100::measureTemperatureSingleshot | ( | max30100::TemperatureData & | td | ) |
Measure tempeature single shot.
[out] | temp | Temperature(Celsius) |
|
inline |
The number of samples lost.
bool m5::unit::UnitMAX30100::readLedConfiguration | ( | max30100::LedConfiguration & | lc | ) |
Read Led configrartion.
[out] | lc | LedConfigration |
bool m5::unit::UnitMAX30100::readModeConfiguration | ( | max30100::ModeConfiguration & | mc | ) |
Read Mode configuration.
[out] | mc | ModeConfigration |
bool m5::unit::UnitMAX30100::readSpO2Configuration | ( | max30100::SpO2Configuration & | sc | ) |
Read SpO2 configrartion.
[out] | sc | SpO2Configration |
bool m5::unit::UnitMAX30100::reset | ( | ) |
Reset.
bool m5::unit::UnitMAX30100::resetFIFO | ( | ) |
Reset FIFO buffer.
|
inline |
Number of data last retrieved.
|
inline |
Start periodic measurement in the current settings.
|
inline |
Start periodic measurement.
mode | Operation mode |
sample_rate | Sampling rate |
pulse_width | Pulse width |
ir_current | IR Led control |
high_resolution | (only SpO2) |
red_current | RED Led control (only SpO2) |
|
inline |
Stop periodic measurement.
bool m5::unit::UnitMAX30100::writeLedConfiguration | ( | const max30100::LedConfiguration | lc | ) |
Write Led configrartion.
lc | LedConfigration |
bool m5::unit::UnitMAX30100::writeModeConfiguration | ( | const max30100::ModeConfiguration | mc | ) |
Write Mode configuration.
mc | ModeConfigration |
bool m5::unit::UnitMAX30100::writeSpO2Configuration | ( | const max30100::SpO2Configuration | sc | ) |
Write SpO2 configrartion.
sc | SpO2Configration |