PAL Interface - Infineon/pas-co2-sensor GitHub Wiki

The interaction with the hardware and platform resources is abstracted from the core library by the definition of a platform abstraction interface.

The platform resources that need to be provided are:

  • GPIO. Digital input and output ports.
  • Timer. A timer for signals and processes synchronization.

At least one the followings:

  • I2C. I2C sensor interface.
  • UART. UART sensor interface.
  • PWM. PWM sensor output interface.

And optionally:

  • Logger. Write output for debug terminal.

The PAL interfaces are implemented as C++ pure virtual classes.

GPIO PAL API

  • init()
  • deinit()
  • enableInt()
  • disableInt()
  • intEvent()
  • read()
  • write()
  • enable()
  • disable()

Find the complete specification for each function of the GPIO PAL interface in the PAL Interface Doxygen docs section.

Timer PAL API

  • init()
  • deinit()
  • start()
  • stop()
  • elapsed()
  • elapsedMicro()
  • delay()

Find the complete specification for each function of the Timer PAL interface in the PAL Interface Doxygen docs section.

I2C PAL API

  • init()
  • deinit()
  • setClockFreq()
  • read()
  • write()

The I2C PAL module is only required if the Serial API is implemented in terms of the I2C core library class.

Find the complete specification for each function of the I2C PAL interface in the PAL Interface Doxygen docs section.

UART PAL API

  • init()
  • deinit()
  • config()
  • read()
  • write()
  • waitReceive()

The UART PAL module is only required if the Serial API is implemented in terms of the UART core library class.

Find the complete specification for each function of the UART PAL interface in the PAL Interface Doxygen docs section.

PWM PAL API

  • init()
  • deinit()
  • getDuty()

The PWM PAL module is only required if the Pulse API used. An GPIO + Timer based PWM input readout module is already implemented in the core library based on the PWM PAL interface. Alternatively, a hardware peripheral based PWM signal readout module can be implemented specifically for a framework and platform.

Find the complete specification for each function of the Timer PAL interface in the PAL Interface Doxygen docs section.

Logger PAL API

  • init()
  • deinit()
  • write()

The Logger module is only required if enabled for debugging purposes.

Find the complete specification for each function of the Logger PAL interface in the PAL Interface Doxygen docs section.