webradio/firmware/input.h

23 lines
483 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 0b11111111
#define PORT_KEYAUX(t) t##B
#define PORT_SBCMON(t) t##C
#define PIN_SBCMON (1 << 2)
#define PORT_ROTARY(t) t##B
#define PIN_ROTARY_A (1 << 0)
#define PIN_ROTARY_B (1 << 1)
void input_init();
void input_proc();
uint8_t get_rotary_delta();
uint8_t get_switch_event();
void input_clear_events();
uint8_t get_sbc_state();
#endif // INPUT_H