Skip to content
MaJerlePublic

About

Lightweight button handler for embedded systems

Resources

Stars

287 stars

Watchers

8 watching

Forks

Repository files navigation

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.

Open documentation

Features

  • Written in C (C11), compatible with stdint.h data 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
  • Pressed-time checks (minimum time or time range), also on release, and multi-button combinations
  • 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:

  1. Fork Github repository
  2. Follow C style & coding rules and use clang-format to format the code
  3. Create a pull request to develop branch with new features or bug fixes

Alternatively you may:

  1. Report a bug
  2. Ask for a feature request

About

Lightweight button handler for embedded systems

Resources

Stars

287 stars

Watchers

8 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages