aboutsummaryrefslogtreecommitdiff
path: root/include/input.h
blob: a2f03e279a845fc28488a6646f4d9e1fa9f76665 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef INPUT_H
#define INPUT_H

#include <fifo.h>

static inline uint8_t
poll_keys(void)
{
	return (port_b_data & 0x7C) >> 2;
}

enum keys {
	KEY1 = 0x01,
	KEY2 = 0x02,
	KEY3 = 0x04,
	KEY4 = 0x08,
	KEY5 = 0x10
};

extern struct fifo input_fifo;

#endif // INPUT_H