leddie/firmware/lib/button.h

15 lines
375 B
C
Raw Permalink Normal View History

2024-02-04 19:59:12 +01:00
#ifndef _BUTTON_H
#define _BUTTON_H
enum BUTTON_EVENTS {
NONE, WAIT_FOR_RELEASE_1, WAIT_FOR_SECOND, WAIT_FOR_RELEASE_2, // Intermediate states
EV_PRESS, EV_DOUBLEPRESS, EV_LONGPRESS, EV_DOUBLELONGPRESS, EV_BOOT// Button events
};
void button_init();
int button_event(enum BUTTON_EVENTS ev);
extern void button_systick_cb();
void button_systick_cb();
#endif // _BUTTON_H