PwmReader.h
Go to the documentation of this file.
void setCallback(Callback callback)
Set a callback to be invoked whenever a valid reading is obtained.
Definition: PwmReader.h:106
Delegate< void(uint16_t ppm)> Callback
Callback for regular readings.
Definition: PwmReader.h:49
static constexpr uint16_t CYCLE_TOLERANCE
Definition: PwmReader.h:44
bool suspend()
Temporarily suspend readings and disable interrupts on the PWM pin.
ValType muldiv(const ValType &value, const NumDenType &num, const NumDenType &den)
Perform muldiv using unsigned integer types.
Definition: muldiv.h:110
Definition: common.h:23
DetectionRange
Device may be configured to output CO2 PPM values in various ranges.
Definition: common.h:27
uint16_t calculatePpm(DetectionRange range)
Definition: PwmReader.h:73