2020-07-27 21:39:29 +02:00
|
|
|
#ifndef INPUT_H
|
|
|
|
#define INPUT_H
|
|
|
|
|
|
|
|
#define PORT_KEYPAD(t) t##D // Keys connected to: 0,1,2(INT0->POWER),5,6,7
|
2020-08-08 16:54:23 +02:00
|
|
|
#define PIN_KEYPAD_MASK 0b11111111
|
2020-07-27 21:39:29 +02:00
|
|
|
#define PORT_KEYAUX(t) t##B
|
|
|
|
|
2020-07-31 19:07:11 +02:00
|
|
|
#define PORT_SBCMON(t) t##C
|
2020-08-08 19:20:24 +02:00
|
|
|
#define PIN_SBCMON (1 << 2)
|
2020-07-31 19:07:11 +02:00
|
|
|
|
2020-08-08 16:54:23 +02:00
|
|
|
#define PORT_ROTARY(t) t##B
|
|
|
|
#define PIN_ROTARY_A (1 << 0)
|
|
|
|
#define PIN_ROTARY_B (1 << 1)
|
2020-07-27 21:39:29 +02:00
|
|
|
|
|
|
|
void input_init();
|
|
|
|
void input_proc();
|
2020-08-09 12:14:21 +02:00
|
|
|
uint8_t get_rotary_delta();
|
2020-07-27 21:39:29 +02:00
|
|
|
uint8_t get_switch_event();
|
2020-07-28 21:54:20 +02:00
|
|
|
void input_clear_events();
|
2020-07-31 19:07:11 +02:00
|
|
|
uint8_t get_sbc_state();
|
2020-07-27 21:39:29 +02:00
|
|
|
|
|
|
|
#endif // INPUT_H
|