PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
pasco2::PWM Class Referenceabstract

#include <pas-co2-pal-pwm.hpp>

Inheritance diagram for pasco2::PWM:

Public Member Functions

virtual Error_t init ()=0
 Initializes the PWM. More...
 
virtual Error_t deinit ()=0
 Deinitializes the PWM. More...
 
virtual Error_t getDuty (double &duty)=0
 Gets the PWM input duty cycle in percentage. More...
 

Member Function Documentation

◆ init()

virtual Error_t pasco2::PWM::init ( )
pure virtual

Initializes the PWM.

Returns
PAS CO2 error code
Return values
OKif success
INTF_ERRORif error

Implemented in pasco2::PWMSW.

◆ deinit()

virtual Error_t pasco2::PWM::deinit ( )
pure virtual

Deinitializes the PWM.

Returns
PAS CO2 error code
Return values
OKif success
INTF_ERRORif error

Implemented in pasco2::PWMSW.

◆ getDuty()

virtual Error_t pasco2::PWM::getDuty ( double &  duty)
pure virtual

Gets the PWM input duty cycle in percentage.

The duty will return 0.00 if no duty is read (e.g. polling mode). In case of error, the duty value will be -1.00, and the function will return the corresponding return code for diagnosis.

Note
The read out of PWM pulses needs to be synched with the incoming PWM signals. This synchronization needs to be handled in the PAL.
Parameters
[out]dutyPWM input duty cycle value from PWM single or train pulse average (00.00 % to 100.00 %)
Returns
PAS CO2 error code
Return values
OKif success
INTF_ERRORif error

Implemented in pasco2::PWMSW.


The documentation for this class was generated from the following file: