PeripheralTemplateLibrary icon indicating copy to clipboard operation
PeripheralTemplateLibrary copied to clipboard

Cross-platform, cross-MCU C++ template library for microcontrollers and peripheral devices

Peripheral Template Library

Peripheral Template Library is a project to develop an efficient cross-platform library for microcontrollers. It provides consistent API to control basic blocks of any microcontroller - GPIO, timers, clocks, ADC, etc., then provides API/implementation of standard protocols to access peripheral devices, like SPI, I2C, UART, 1-Wire, etc.

To achieve high-level efficiency, PTL is built using (C++) templated static types, allowing to apply aggressive compile-time optimizations, achieving the efficiency level of the C code purposedly written for specific MCU. Using templates also allows to provide optimized protocol implementations utilizing specialized MCU hardware blocks like SPI/I2C controllers (default implementations provided use bitbanging over GPIO).

The library is currently achieving inital code stabilization, though APIs are still not stable, there're lot of refactoring to do, and there may be some non-ideal C++ code around.

Current targets supported (together with example boards) are:

* TI MSP430
    * MSP430 Launchpad
* Atmel AVR
    * Arduino Duemilanove
* ARM Cortex-M
    * ST STM32
        * STM32VLDISCOVERY
    * Energy Micro EFM32
        * EFM32GG-STK3700
    * TI Tiva C TM4 (former Stellaris LM4)
        * Stellaris/Tiva Launchpad

Note that different targets have different level of hardware support.

For setup instructions, refer to docs/getting_started.markdown (https://github.com/pfalcon/PeripheralTemplateLibrary/blob/master/docs/getting_started.markdown online). More documentation is available in docs/ directory.

The Peripheral Template Library is licensed under GNU Lesser General Public License (LGPL), version 3 or later. Please review detailed terms in the included LICENSE file.

Author: Paul Sokolovsky {pfalcon at users.sourceforge.net}