|
| UnitMAX30102 (const uint8_t addr=DEFAULT_ADDRESS) |
|
virtual bool | begin () override |
|
virtual void | update (const bool force=false) override |
|
uint32_t | caluculateSamplingRate () |
| Calculate the sampling rate from the current settings.
|
|
bool | reset () |
| Reset.
|
|
bool | readRevisionID (uint8_t &rev) |
| Read the revision ID.
|
|
|
config_t | config () |
| Gets the configration.
|
|
void | config (const config_t &cfg) |
| Set the configration.
|
|
|
uint32_t | ir () const |
| Oldest IR.
|
|
uint32_t | red () const |
| Oldest Red.
|
|
uint8_t | retrived () const |
| Number of data last retrieved.
|
|
uint8_t | overflow () const |
| The number of samples lost.
|
|
|
bool | startPeriodicMeasurement () |
| Start periodic measurement in the current settings.
|
|
bool | startPeriodicMeasurement (const max30102::Mode mode, const max30102::ADC range, const max30102::Sampling rate, const max30102::LEDPulse width, const max30102::FIFOSampling avg, const uint8_t ir_current, const uint8_t red_current) |
| Start periodic measurement.
|
|
bool | stopPeriodicMeasurement () |
| Stop periodic measurement.
|
|
|
bool | readMode (max30102::Mode &mode) |
| Read the operation mode.
|
|
bool | writeMode (const max30102::Mode mode) |
| Write the operation mode.
|
|
bool | readShutdownControl (bool &shdn) |
| Read the shutdown control.
|
|
bool | writeShutdownControl (const bool shdn) |
| Write the shutdown control.
|
|
|
- Note
- Note that there are different combinations that can be set depending on the mode
- Mode:SPO2
Sampling\LEDPulseWidth | 69 | 118 | 215 | 411 |
50 | o | o | o | o |
100 | o | o | o | o |
200 | o | o | o | o |
400 | o | o | o | o |
800 | o | o | o | x |
1000 | o | o | x | x |
1600 | o | x | x | x |
3200 | x | x | x | x |
- Mode:HROnly
Sampling\LEDPulseWidth | 69 | 118 | 215 | 411 |
50 | o | o | o | o |
100 | o | o | o | o |
200 | o | o | o | o |
400 | o | o | o | o |
800 | o | o | o | o |
1000 | o | o | o | o |
1600 | o | o | o | x |
3200 | o | x | x | x |
|
bool | readSpO2Configuration (max30102::ADC &range, max30102::Sampling &rate, max30102::LEDPulse &width) |
| Read the SpO2 configuration.
|
|
bool | readSpO2ADCRange (max30102::ADC &range) |
| Read the ADC range.
|
|
bool | readSpO2SamplingRate (max30102::Sampling &rate) |
| Read the sampling rate.
|
|
bool | readSpO2LEDPulseWidth (max30102::LEDPulse &width) |
| Read the LED pulse width.
|
|
bool | writeSpO2Configuration (const max30102::ADC range, const max30102::Sampling rate, const max30102::LEDPulse width) |
| Write the SpO2 configuration.
|
|
bool | writeSpO2ADCRange (const max30102::ADC range) |
| Write the ADC range.
|
|
bool | writeSpO2SamplingRate (const max30102::Sampling rate) |
| Write the sampling rate.
|
|
bool | writeSpO2LEDPulseWidth (const max30102::LEDPulse width) |
| Write the LED pulse width.
|
|
|
- Note
- Note that the target LEDs differ depending on the mode
-
In SPO2/HRonly mode, slot1(LED1):Red slot2(LED2):IR
-
In MultiMode, it is the same as the Slot setting
|
bool | readLEDCurrent (uint8_t &raw, const uint8_t slot) |
| Read the LED current.
|
|
bool | readLEDCurrent (float &mA, const uint8_t slot) |
| Read the LED current.
|
|
bool | writeLEDCurrent (const uint8_t slot, const uint8_t raw) |
| Write the LED current.
|
|
template<typename T , typename std::enable_if< std::is_floating_point< T >::value, std::nullptr_t >::type = nullptr> |
bool | writeLEDCurrent (const uint8_t slot, const T mA) |
| Write the LED current.
|
|
|
- Warning
- Available only in MultiLED Mode
-
For MAX30102 only slots 1 and 2 are valid
|
bool | readMultiLEDModeControl (max30102::Slot &slot1, max30102::Slot &slot2) |
| Read the the MultiLED Mode form Slot 1-2.
|
|
bool | writeMultiLEDModeControl (const max30102::Slot slot1, const max30102::Slot slot2) |
| Write the MultiLED Mode to Slot 1-2.
|
|
|
bool | measureTemperatureSingleshot (max30102::TemperatureData &td) |
| Measure tempeature single shot.
|
|
|
bool | readFIFOConfiguration (max30102::FIFOSampling &avg, bool &rollover, uint8_t &almostFull) |
| Read the FIFO configuration.
|
|
bool | writeFIFOConfiguration (const max30102::FIFOSampling avg, const bool rollover, const uint8_t almostFull) |
| Write the FIFO configuration.
|
|
bool | readFIFOReadPointer (uint8_t &rptr) |
| Read the FIFO read pointer.
|
|
bool | writeFIFOReadPointer (const uint8_t rptr) |
| Write the FIFO read pointer.
|
|
bool | readFIFOWritePointer (uint8_t &wptr) |
| Read the FIFO write pointer.
|
|
bool | writeFIFOWritePointer (const uint8_t wptr) |
| Write the FIFO write pointer.
|
|
bool | readFIFOOverflowCounter (uint8_t &cnt) |
| Read the FIFO overflow counter.
|
|
bool | writeFIFOOverflowCounter (const uint8_t cnt) |
| Write the FIFO overflow counter.
|
|
bool | resetFIFO () |
| Reset FIFO pointer and counter.
|
|
|
bool | read_register (const uint8_t reg, uint8_t *buf, const size_t len) |
|
bool | read_register8 (const uint8_t reg, uint8_t &v) |
|
bool | start_periodic_measurement () |
|
bool | start_periodic_measurement (const max30102::Mode mode, const max30102::ADC range, const max30102::Sampling rate, const max30102::LEDPulse width, const max30102::FIFOSampling avg, const uint8_t ir_current, const uint8_t red_current) |
|
bool | stop_periodic_measurement () |
|
bool | write_spo2_configuration (const max30102::SpO2Configuration &sc) |
|
bool | read_led_current (const uint8_t idx, uint8_t &raw) |
|
bool | read_led_current (const uint8_t idx, float &mA) |
|
bool | write_led_current (const uint8_t idx, const uint8_t raw) |
|
bool | write_led_current (const uint8_t idx, const float mA) |
|
bool | write_fifo_sampling_average (const max30102::FIFOSampling avg) |
|
bool | read_FIFO () |
|
bool | reset_FIFO (const bool circling_read_ptr=true) |
|
bool | read_measurement_temperature (max30102::TemperatureData &td) |
|
| M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitMAX30102, max30102::Data) |
|
Pulse oximetry and heart-rate sensor.
- Note
- The only single measurement is temperature; other data is constantly measured and stored