diff --git a/README.md b/README.md index b04f203..7a580b1 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ * Platform independent, requires user to provide millisecond timing source * No dynamic memory allocation * Callback driven event management +* Support for click, multi click and long press events +* Support for software debounce for press and release events * Easy to use and maintain * User friendly MIT license diff --git a/docs/index.rst b/docs/index.rst index d649723..21b995f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,6 +18,8 @@ Features * Platform independent, requires user to provide millisecond timing source * No dynamic memory allocation * Callback driven event management +* Support for click, multi click and long press events +* Support for software debounce for press and release events * Easy to use and maintain * User friendly MIT license diff --git a/docs/user-manual/index.rst b/docs/user-manual/index.rst index bd0e54e..3ed2331 100644 --- a/docs/user-manual/index.rst +++ b/docs/user-manual/index.rst @@ -26,6 +26,20 @@ A simple example for win32 is below: :linenos: :caption: Win32 example code +Input pin state reading +^^^^^^^^^^^^^^^^^^^^^^^ + +User must implement a callback function that is periodically called from the **LwBTN** library, every time user calls one of the processing functions, such as :c:func:`lwbtn_process` or :c:func:`lwbtn_process_ex` functions. + +The input reading function is required to provide the actual state of the input and must return a state: + +* ``1`` when input is considered active (pressed) +* ``0`` when input is considered released (not-pressed) or in idle state + +.. tip:: + This is the place where you check peripheral GPIO registers in your embedded device and report the status to the library. + Depending on the physical wiring, you should check if peripheral bit is set or clear, to determine if input is active or inactive. + Input events ^^^^^^^^^^^^