PAS CO2 Sensor  1.0.3
C++ library for Infineon Photoacoustic Spectroscopy (PAS) XENSIV™ CO2 miniaturized sensor
GPIOIno Class Reference

#include <pas-co2-pal-gpio-ino.hpp>

Inheritance diagram for GPIOIno:
Collaboration diagram for GPIOIno:

Public Member Functions

 GPIOIno (uint8_t pin, uint8_t mode, VLogic_t logic)
 GPIO Ino constructor. More...
 
 ~GPIOIno ()
 GPIO Ino destructor. More...
 
Error_t init ()
 Initializes the Arduino GPIO. More...
 
Error_t deinit ()
 Deinitializes the Arduino GPIO. More...
 
Error_t enableInt (void(*cback)(void *))
 Enables the Arduino GPIO interrupt. More...
 
Error_t disableInt ()
 Disables the Arduino GPIO interrupt. More...
 
IntEvent_t intEvent ()
 Gets the latest Arduino interrupt event. More...
 
VLevel_t read ()
 Reads the Arduino GPIO voltage level. More...
 
Error_t write (VLevel_t level)
 Writes the Arduino GPIO output voltage level. More...
 
Error_t enable ()
 Enables the Arduino GPIO output according to the GPIO logic. More...
 
Error_t disable ()
 Disables the Arduino GPIO output according to the GPIO logic. More...
 

Static Public Attributes

static const uint8_t unusedPin = 0xFFU
 

Additional Inherited Members

- Public Types inherited from pasco2::GPIO
enum  IntEvent_t { INT_FALLING_EDGE = 0, INT_RISING_EDGE = 1 }
 
enum  VLevel_t { GPIO_LOW = 0, GPIO_HIGH = 1 }
 
enum  VLogic_t { NEGATIVE = 1, POSITIVE = 2 }
 

Constructor & Destructor Documentation

◆ GPIOIno()

GPIOIno::GPIOIno ( uint8_t  pin,
uint8_t  mode,
VLogic_t  logic 
)

GPIO Ino constructor.

Parameters
[in]pinPin number
[in]modeArduino GPIO mode (INPUT, OUTPUT, INPUT_PULLUP)
[in]logicVoltage logic

◆ ~GPIOIno()

GPIOIno::~GPIOIno ( )

GPIO Ino destructor.

Member Function Documentation

◆ init()

Error_t GPIOIno::init ( void  )
virtual

Initializes the Arduino GPIO.

Returns
PAS CO2 error code
Return values
OKalways

Implements pasco2::GPIO.

◆ deinit()

Error_t GPIOIno::deinit ( void  )
virtual

Deinitializes the Arduino GPIO.

Returns
PAS CO2 error code
Return values
OKalways

Implements pasco2::GPIO.

◆ enableInt()

Error_t GPIOIno::enableInt ( void(*)(void *)  cback)
virtual

Enables the Arduino GPIO interrupt.

Parameters
[in]*cbackFunction pointer of the interrupt callback
Returns
PAS CO2 error code
Return values
OKalways

Implements pasco2::GPIO.

◆ disableInt()

Error_t GPIOIno::disableInt ( )
inlinevirtual

Disables the Arduino GPIO interrupt.

Returns
PAS CO2 error code
Return values
OKalways

Implements pasco2::GPIO.

◆ intEvent()

GPIOIno::IntEvent_t GPIOIno::intEvent ( )
inlinevirtual

Gets the latest Arduino interrupt event.

Returns
GPIO interrupt event
Return values
INT_FALLING_EDGEif falling edge event
INT_RISING_EDGEif rising edge event

Implements pasco2::GPIO.

◆ read()

GPIOIno::VLevel_t GPIOIno::read ( )
inlinevirtual

Reads the Arduino GPIO voltage level.

Returns
GPIO voltage level
Return values
GPIO_LOWif voltage low
GPIO_HIGHif voltage high

Implements pasco2::GPIO.

◆ write()

Error_t GPIOIno::write ( VLevel_t  level)
inlinevirtual

Writes the Arduino GPIO output voltage level.

Parameters
[in]levelVoltage level
Returns
PAS CO2 error code
Return values
OKalways

Implements pasco2::GPIO.

◆ enable()

Error_t GPIOIno::enable ( )
inlinevirtual

Enables the Arduino GPIO output according to the GPIO logic.

  • Low if negative
  • High if positive
    Returns
    PAS CO2 error code
    Return values
    OKalways

Implements pasco2::GPIO.

◆ disable()

Error_t GPIOIno::disable ( )
inlinevirtual

Disables the Arduino GPIO output according to the GPIO logic.

  • Low if positive
  • High if negative
    Returns
    GPIO error code
    PAS CO2 error code
    Return values
    OKalways

Implements pasco2::GPIO.

Member Data Documentation

◆ unusedPin

const uint8_t GPIOIno::unusedPin = 0xFFU
static

Unused pin


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