You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
462 B
20 lines
462 B
#ifndef COMPONENTS_FIRMWARE_NXBUTTONS_H_ |
|
#define COMPONENTS_FIRMWARE_NXBUTTONS_H_ |
|
|
|
#include <stdint.h> |
|
#include <stdbool.h> |
|
|
|
#define BUTTON_SERVICE_ID 1 |
|
#define BUTTON_SERVICE_GPIO_NUM 23 |
|
|
|
typedef void (*ButtonEventHandler)(uint8_t btn); |
|
|
|
void nxInitButtons(void); |
|
|
|
void nxSetOnPressHandler(ButtonEventHandler handler); |
|
|
|
void nxSetOnReleaseHandler(ButtonEventHandler handler); |
|
|
|
bool nxIsButtonPressed(uint8_t btn); |
|
|
|
#endif /* COMPONENTS_FIRMWARE_NXBUTTONS_H_ */
|
|
|