gadget-chilipepper-plantmon.../button.h

24 lines
434 B
C
Raw Permalink Normal View History

2019-03-26 09:28:17 +01:00
#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