blob: 25c9f1107de68260b39cb487038e2b9b8549367f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
/*
* This file contains constants related to the LED's on the cpu boards.
* The LED's are two 7-segment displays.
*
* The segments of each digit are labeled as follows:
* a a
* --- ---
* f| |b f| |b
* -g- -g-
* e| |c e| |c
* --- . --- .
* d d
*
* Each segment corresponds to a bit in the LED register:
*
* left hand digit | right hand digit
* 15 0
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* |.|g|f|e|d|c|b|a|.|g|f|e|d|c|b|a|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
* To turn a segment ON, the bit must be cleared, and to
* turn a segment OFF, the bit must be set.
*/
#define LED_SEG_A 0xfe
#define LED_SEG_B 0xfd
#define LED_SEG_C 0xfb
#define LED_SEG_D 0xf7
#define LED_SEG_E 0xef
#define LED_SEG_F 0xdf
#define LED_SEG_G 0xbf
#define LED_SEG_P 0x7f
/* codes mapped into LED register values: */
#define LED_0 0xc0 /* "0" */
#define LED_1 0xf9 /* "1" */
#define LED_2 0xa4 /* "2" */
#define LED_3 0xb0 /* "3" */
#define LED_4 0x99 /* "4" */
#define LED_5 0x92 /* "5" */
#define LED_6 0x82 /* "6" */
#define LED_7 0xf8 /* "7" */
#define LED_8 0x80 /* "8" */
#define LED_9 0x98 /* "9" */
#define LED_A 0x88 /* "A" */
#define LED_b 0x83 /* "b" */
#define LED_C 0xc6 /* "C" */
#define LED_d 0xa1 /* "d" */
#define LED_E 0x86 /* "E" */
#define LED_F 0x8e /* "F" */
#define LED_P 0x8c /* "P" */
#define LED_L 0xc7 /* "L" */
#define LED_S 0x92 /* "S" */
#define LED_U 0xc1 /* "U" */
#define LED_t (LED_SEG_F & LED_SEG_E & LED_SEG_G) /* "t" */
#define LED_BLANK 0xff /* " " */
#define LED_BAR 0xfe /* "-" (upper) */
#define LED_DASH 0xbf /* "-" (middle) */
#define LED_RUB 0xf7 /* "_" (lower) */
#define LED_EQU 0xbe /* "=" (upper) */
#define LED_EQL 0xb7 /* "=" (lower) */
#define LED_OU 0x9c /* "o" (upper) */
#define LED_OL 0xa3 /* "o" (lower) */
#define LED_DP 0x7f /* "." */
|