21 lines
463 B
C
21 lines
463 B
C
#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)
|
|
|
|
#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();
|
|
void input_clear_events();
|
|
extern uint8_t ctime;
|
|
|
|
#endif // INPUT_H
|