2024A-SW/managed_components/espressif__button
Joe Kearney 89166c8a02 Updated libraries (button and audio player) (#16)
This PR updates two dependency libraries to their latest versions:

## espressif/button: v3.5.0 to v4.1.5

[Version 4](https://components.espressif.com/components/espressif/button/versions/4.1.5/changelog?language=en) changed the API.  This code makes use of the new API, with no change to the existing behavior.

## chmorgan/esp-audio-player: v1.0.7 to v1.1.0

[Version 1.1.0](https://github.com/chmorgan/esp-audio-player/releases/tag/v1.1.0) introduces the possibility of multiple simultaneous audio streams.  This feature is as yet unused by KTag.

Co-authored-by: Joe Kearney <joe@clubk.club>
Reviewed-on: #16
2026-02-07 22:30:37 +00:00
..
include Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
interface Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
test_apps Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
.component_hash Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
button_adc.c Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
button_gpio.c Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
button_matrix.c Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
CHANGELOG.md Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
CMakeLists.txt Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
idf_component.yml Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
iot_button.c Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
Kconfig Updated libraries (button and audio player) (#16) 2026-02-07 22:30:37 +00:00
license.txt Initial public release of the 2024A software. 2025-01-25 14:04:42 -06:00
README.md Initial public release of the 2024A software. 2025-01-25 14:04:42 -06:00

Component Registry

Component: Button

Online documentation

After creating a new button object by calling function button_create(), the button object can create press events, every press event can have its own callback.

List of supported events:

  • Button pressed
  • Button released
  • Button pressed repeat
  • Button press repeat done
  • Button single click
  • Button double click
  • Button multiple click
  • Button long press start
  • Button long press hold
  • Button long press up
  • Button Press end

There are three ways this driver can handle buttons:

  1. Buttons connected to standard digital GPIO
  2. Multiple buttons connected to single ADC channel
  3. Matrix keyboard employs multiple GPIOs for operation.
  4. Custom button connect to any driver

The component supports the following functionalities:

  1. Creation of an unlimited number of buttons, accommodating various types simultaneously.
  2. Multiple callback functions for a single event.
  3. Allowing customization of the consecutive key press count to any desired number.
  4. Facilitating the setup of callbacks for any specified long-press duration.
  5. Support power save mode (Only for gpio button)

Add component to your project

Please use the component manager command add-dependency to add the button to your project's dependency, during the CMake step the component will be downloaded automatically

idf.py add-dependency "espressif/button=*"