buttons.h 351 B

12345678910111213141516171819202122232425262728
  1. #ifndef BUTTONS_H_
  2. #define BUTTONS_H_
  3. #include "util.h"
  4. enum button_id {
  5. BUTTON_SET,
  6. BUTTON_MINUS,
  7. BUTTON_PLUS,
  8. BUTTON_IRON,
  9. NR_BUTTONS,
  10. };
  11. enum button_state {
  12. BSTATE_POSEDGE,
  13. BSTATE_NEGEDGE,
  14. BSTATE_PRESSED,
  15. };
  16. uint8_t button_is_pressed(enum button_id button);
  17. void buttons_work(void);
  18. void buttons_init(void);
  19. #endif /* BUTTONS_H_ */