-
Notifications
You must be signed in to change notification settings - Fork 1
PAL Interface
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
2. Library Details
Library Architecture
PAS CO2 Serial API
PAS CO2 Pulse API
PAL Interface
Source Tree Structure
Preprocessor Configuration
Porting Guide
Doxygen Docs
4. Software Frameworks
Arduino
- Getting Started
- Lib Installation
- Ino Examples
- Arduino API
- PlatformIO