Welcome to libhal
Abstract
libhal exists to make hardware drivers ð portable, ðĶū flexible, ðĶ accessible, and ð° easy to use. libhal seeks to provide a foundation for embedded drivers, allowing those drivers to be used across different processors, microcontrollers, systems, and devices.
The design philosophy of libhal is to be:
- Portable & Cross Platform
- Light Weight
- General
- Minimalist
- Safe & Reliable
- Tested & Testable
- Compiled Quickly
- OS Agnostic
The Basics
libhal, at its core, is simply a set of interfaces that correspond to hardware devices and peripherals. These interfaces use runtime polymorphism in order to decouple application logic from driver implementation details. This decoupling enables applications to run on any platform device that has the necessary components available.
A quick example is a blinker program. The required interfaces for such a program
is a hal::output_pin
for controlling the LED and a hal::steady_clock
for
keeping time. Now your application takes both of these drivers without having to
consider their implementation details and blink and LED at a specified interval.
Support
- libhal discord server (preferred)
- GitHub issues
- Cpplang Slack #embedded channel
Distribution
- Conan package manager
- Source code is hosted on GitHub
vcpkg
package manager (planned for the future)
Sponsorships
We are proud to be sponsored by JFrog. JFrog generously provides us with free artifact management, security, and CI/CD tools, allowing us to focus on the success of our project.
We are grateful for their support and contribution to the open source community. Thank you, JFrog!
For more information about JFrog's community initiatives, visit their Giving Back page.