Skip to content

niwciu/PUSHBUTTON_SWITCH_LIB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PUSHBUTTON_SWITCH_LIB - simple C cross-platform library

keypad_lib

GitHub License GitHub top language GitHub Release Coverage Status Unit Tests

PushButton GCOVR Report
PushButton Code Complexity Report

Switch GCOVR Report
Switch Code Complexity Report

The PUSHBUTTON_SWITCH_LIB is a simple cross-platform C library providing interfaces for pushbuttons and two-state switches (two-state input signals).

Features

Push Buttons:

  • 3 trigger modes:
    • TRIGGER_ON_PUSH
    • TRIGGER_ON_RELEASE
    • TRIGGER_ON_SHORT_PUSH_AND_LONG_PUSH
  • Option to enable repetition
  • Fully configurable time slots for:
    • debounce time
    • time to the first repetition
    • time between continuous repetitions
    • time defining the difference between short and long push
  • Option to dynamically register callbacks for each trigger source
  • Driver interface that is fully separated from the driver layer

Switches:

  • Debounce functionality based on a repeat count of the same state (no timer needed)
  • Fully configurable debounce counter
  • Dynamically register callbacks for switch ON and OFF states
  • Driver interface that is fully separated from the driver layer

Examples, how to use library etc.

For more information about usage, examples, colaboration and all features please refer to project wiki


myEmbeddedWayBanerWhiteSmaller