webradio/firmware/input.h

23 lines
482 B
C
Raw Normal View History

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
#define PIN_SBCMON (1 << 1)
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();
int8_t get_rotary_delta();
uint8_t get_switch_event();
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