24 lines
434 B
C
24 lines
434 B
C
|
#ifndef BUTTON_H_INCLUDED
|
||
|
#define BUTTON_H_INCLUDED
|
||
|
extern volatile int button_press_pending;
|
||
|
/* Selectors: PB8, PB9 */
|
||
|
|
||
|
#define PSEL_0 (1 << 8)
|
||
|
#define PSEL_1 (1 << 9)
|
||
|
|
||
|
|
||
|
/* Input lines: PH6, PA8, PB15, PB14 */
|
||
|
|
||
|
#define PLINE_0 (1 << 6)
|
||
|
#define PLINE_1 (1 << 8)
|
||
|
#define PLINE_2 (1 << 15)
|
||
|
#define PLINE_3 (1 << 14)
|
||
|
|
||
|
#define PUSER (1 << 11)
|
||
|
|
||
|
void button_setup(void);
|
||
|
void button_start_read(void);
|
||
|
int button_is_pressed(void);
|
||
|
|
||
|
#endif
|