10 #ifndef PAS_CO2_PWM_SW_HPP_ 11 #define PAS_CO2_PWM_SW_HPP_ 15 #if IS_INTF(PAS_CO2_INTF_PWM_SW) 57 volatile bool risingEdgeEvent;
58 volatile bool fallingEdgeEvent;
60 static constexpr uint8_t pulseTrainLen = 160;
65 typedef void (* cback_t)(
void *);
67 static constexpr uint8_t maxGPIOObjs = 4;
68 static uint8_t idxNext;
69 static PWMSW * objPtrVector[maxGPIOObjs];
70 static void * fnPtrVector [maxGPIOObjs];
PWMSW(GPIO *const pwmIn, Timer *const timer, Mode_t mode)
PAS CO2 Software PWM Constructor.
Definition: pas-co2-pwm-sw.cpp:25
Definition: pas-co2-pal-pwm.hpp:23
static void int2Handler()
Interrupt 2 Handler.
Definition: pas-co2-pwm-sw.cpp:301
Error_t getDuty(double &duty)
Gets the PWM input duty cycle in percentage.
Definition: pas-co2-pwm-sw.cpp:115
static void * isrRegister(PWMSW *objPtr)
Register a hardware interrupt for the PWMSW object passed by argument.
Definition: pas-co2-pwm-sw.cpp:326
Mode_t
Measuring Mode.
Definition: pas-co2-pwm-sw.hpp:36
Definition: pas-co2-i2c.hpp:21
Error_t
Definition: pas-co2-types.hpp:24
void callback()
Definition: pas-co2-pwm-sw.cpp:244
static void int0Handler()
Interrupt 0 Handler.
Definition: pas-co2-pwm-sw.cpp:285
static void int1Handler()
Interrupt 1 Handler.
Definition: pas-co2-pwm-sw.cpp:293
Definition: pas-co2-pwm-sw.hpp:39
Error_t deinit()
Deinitializes the PWM.
Definition: pas-co2-pwm-sw.cpp:75
~PWMSW()
PAS CO2 Software PWM Destructor.
Definition: pas-co2-pwm-sw.cpp:37
Definition: pas-co2-pwm-sw.hpp:38
Definition: pas-co2-pal-gpio.hpp:25
Error_t init()
Initializes the PWM.
Definition: pas-co2-pwm-sw.cpp:48
PAS CO2 Timer Platform Abstraction Layer.
Definition: pas-co2-pal-timer.hpp:24
PAS CO2 GPIO Platform Abstraction Layer.
PAS CO2 Library Configuration.
static void int3Handler()
Interrupt 3 Handler.
Definition: pas-co2-pwm-sw.cpp:309
Definition: pas-co2-pwm-sw.hpp:29
PAS CO2 PWM Platform Abstraction Layer.