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
|
|
|
|
#define PIN_KEYPAD_MASK 0b11100111
|
|
|
|
#define PORT_KEYAUX(t) t##B
|
|
|
|
#define PIN_ROTARY_PUSH (1 << 0)
|
|
|
|
|
2020-07-31 19:07:11 +02:00
|
|
|
#define PORT_SBCMON(t) t##C
|
|
|
|
#define PIN_SBCMON (1 << 1)
|
|
|
|
|
2020-07-27 21:39:29 +02:00
|
|
|
#define PORT_ROTARY(t) t##D
|
|
|
|
#define PIN_ROTARY_A (1 << 3) // INT1
|
|
|
|
#define PIN_ROTARY_B (1 << 4)
|
|
|
|
|
|
|
|
void input_init();
|
|
|
|
void input_proc();
|
|
|
|
int8_t get_rotary_delta();
|
|
|
|
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
|