M5Unit-HEART 0.1.0 git rev:05c3b01
Loading...
Searching...
No Matches
unit_MAX30102.hpp File Reference

MAX30102 Unit for M5UnitUnified. More...

#include <M5UnitComponent.hpp>
#include <m5_utility/stl/extension.hpp>
#include <m5_utility/container/circular_buffer.hpp>
#include <limits>

Go to the source code of this file.

Classes

struct  m5::unit::max30102::Data
 Measurement data group. More...
 
struct  m5::unit::max30102::TemperatureData
 Measurement data group for temperature. More...
 
class  m5::unit::UnitMAX30102
 Pulse oximetry and heart-rate sensor. More...
 
struct  m5::unit::UnitMAX30102::config_t
 Settings for begin. More...
 

Namespaces

namespace  m5
 Top level namespace of M5stack.
 
namespace  max30102
 For MAX30102.
 

Enumerations

enum class  m5::unit::max30102::Mode : uint8_t { None , HROnly = 0x02 , SpO2 , MultiLED = 0x07 }
 Operation mode. More...
 
enum class  m5::unit::max30102::ADC : uint8_t { Range2048nA , Range4096nA , Range8192nA , Range16384nA }
 SpO2 ADC Range Control. More...
 
enum class  m5::unit::max30102::Sampling : uint8_t {
  Rate50 , Rate100 , Rate200 , Rate400 ,
  Rate800 , Rate1000 , Rate1600 , Rate3200
}
 Sampling rate for pulse/conversion. More...
 
enum class  m5::unit::max30102::LEDPulse : uint8_t { Width69 , Width118 , Width215 , Width411 }
 LED pulse width (the IR and RED have the same pulse width) More...
 
enum class  m5::unit::max30102::Slot : uint8_t { None , Red , IR }
 Multi-LED mode control. More...
 
enum class  m5::unit::max30102::FIFOSampling : uint8_t {
  Average1 , Average2 , Average4 , Average8 ,
  Average16 , Average32
}
 Number of samples averaged per FIFO sample. More...
 

Variables

constexpr uint8_t m5::unit::max30102::MAX_FIFO_DEPTH {32}
 FIFO depth.
 

Detailed Description

MAX30102 Unit for M5UnitUnified.

Enumeration Type Documentation

◆ ADC

enum class m5::unit::max30102::ADC : uint8_t
strong

SpO2 ADC Range Control.

Warning
If the ambient environment is very bright or the sensor is exposed to strong light, setting a smaller value may cause the IR/RED to overflow
Enumerator
Range2048nA 

LSB size 7.81 Full scale 2048.

Range4096nA 

LSB size 15.63 Full scale 4096.

Range8192nA 

LSB size 31.25 Full scale 8192.

Range16384nA 

LSB size 62.5 Full scale 16384.

◆ FIFOSampling

enum class m5::unit::max30102::FIFOSampling : uint8_t
strong

Number of samples averaged per FIFO sample.

Enumerator
Average1 

1 (no averaging)

Average2 

2

Average4 

4

Average8 

8

Average16 

16

Average32 

32

◆ LEDPulse

enum class m5::unit::max30102::LEDPulse : uint8_t
strong

LED pulse width (the IR and RED have the same pulse width)

Enumerator
Width69 

68.95 us (ADC 15 bits)

Width118 

117.78 us (ADC 16 bits)

Width215 

215.44 us (ADC 17 bits)

Width411 

410.75 us (ADC 18 bits)

◆ Mode

enum class m5::unit::max30102::Mode : uint8_t
strong

Operation mode.

Enumerator
None 

None.

HROnly 

Heart Rate mode (Red only)

SpO2 

SpO2 mode (Red and IR)

MultiLED 

Multi-LED mode (Red and IR)

◆ Sampling

enum class m5::unit::max30102::Sampling : uint8_t
strong

Sampling rate for pulse/conversion.

Unit is the number of sample per second

Enumerator
Rate50 

50 sps

Rate100 

100 sps

Rate200 

200 sps

Rate400 

400 sps

Rate800 

800 sps

Rate1000 

1000 sps

Rate1600 

1600 sps

Rate3200 

3200 sps

◆ Slot

enum class m5::unit::max30102::Slot : uint8_t
strong

Multi-LED mode control.

Enumerator
None 

None (time slot is disabled)

Red 

LED1 (Red)

IR 

LED2 (IR)