Sun, 08 Nov 2015 22:13:02 +0100
Reenabled code round LCD driver.
197 | 1 | #ifndef _PANEL_H |
2 | #define _PANEL_H | |
3 | ||
4 | ||
5 | ||
6 | /* | |
7 | * GPIO pins for the frontpanel LED and push buttons. | |
8 | */ | |
9 | #define PANEL_LED 2 | |
10 | #define PANEL_ENTER 4 | |
11 | #define PANEL_DOWN 5 | |
12 | #define PANEL_UP 6 | |
13 | ||
14 | ||
200
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
15 | /* |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
16 | * Key names |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
17 | */ |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
18 | #define KEY_NONE 0 |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
19 | #define KEY_UP 1 |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
20 | #define KEY_DOWN 2 |
205 | 21 | #define KEY_ESCAPE 3 |
200
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
22 | #define KEY_ENTER 4 |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
23 | #define KEY_CONFIRM 5 /* Long Enter */ |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
24 | #define KEY_ALL 99 |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
25 | |
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
26 | |
418
0bfe08c7ba6e
Reenabled code round LCD driver.
Michiel Broek <mbroek@mbse.eu>
parents:
229
diff
changeset
|
27 | #ifdef HAVE_WIRINGPI_H |
0bfe08c7ba6e
Reenabled code round LCD driver.
Michiel Broek <mbroek@mbse.eu>
parents:
229
diff
changeset
|
28 | |
200
a215ddaabbe2
Added first panel key routines. The LCD display steps manual only and has a 2 minutes backlight timeout.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
29 | int keycheck(void); |
204
9a14d6b2de7f
Fixed LCD display updates. Better key routines.
Michiel Broek <mbroek@mbse.eu>
parents:
200
diff
changeset
|
30 | |
197 | 31 | |
199 | 32 | PI_THREAD (my_panel_loop); |
33 | ||
34 | ||
197 | 35 | #endif |
36 | ||
37 | #endif |