mirror of
https://github.com/MaJerle/lwbtn.git
synced 2026-10-02 20:24:06 +08:00
develop
…
Lightweight button manager
LwBTN is a lightweight, platform independent library for button and input-pin management in embedded systems. It debounces raw pin state changes and turns them into click, multi-click and keep-alive (long-press) events, delivered through a single application callback.
Features
- Written in C (C11), compatible with
stdint.hdata types - Platform independent, requires user to provide millisecond timing source
- No dynamic memory allocation
- Callback-driven event management
- Support for click, multi-click and keep-alive (long press) events
- Support for software debounce for press and release events
- Runtime configurable debounce, click and keep-alive timing, per button
- Selectable button state acquisition: callback, manual or hybrid mode
- Support for multiple independent button-group instances
- Easy to use and maintain
- User friendly MIT license
Contribute
Fresh contributions are always welcome. Simple instructions to proceed:
- Fork Github repository
- Follow C style & coding rules and use
clang-formatto format the code - Create a pull request to
developbranch with new features or bug fixes
Alternatively you may:
- Report a bug
- Ask for a feature request
Languages
C
94.1%
CMake
4.5%
Python
1.4%