diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sh64/kernel/alphanum.c |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'arch/sh64/kernel/alphanum.c')
-rw-r--r-- | arch/sh64/kernel/alphanum.c | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/sh64/kernel/alphanum.c b/arch/sh64/kernel/alphanum.c new file mode 100644 index 000000000000..56d6f9f71524 --- /dev/null +++ b/arch/sh64/kernel/alphanum.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * arch/sh64/kernel/alpanum.c | ||
3 | * | ||
4 | * Copyright (C) 2002 Stuart Menefy <stuart.menefy@st.com> | ||
5 | * | ||
6 | * May be copied or modified under the terms of the GNU General Public | ||
7 | * License. See linux/COPYING for more information. | ||
8 | * | ||
9 | * Machine-independent functions for handling 8-digit alphanumeric display | ||
10 | * (e.g. Agilent HDSP-253x) | ||
11 | */ | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/stddef.h> | ||
14 | #include <linux/sched.h> | ||
15 | |||
16 | void mach_alphanum(int pos, unsigned char val); | ||
17 | void mach_led(int pos, int val); | ||
18 | |||
19 | void print_seg(char *file, int line) | ||
20 | { | ||
21 | int i; | ||
22 | unsigned int nibble; | ||
23 | |||
24 | for (i = 0; i < 5; i++) { | ||
25 | mach_alphanum(i, file[i]); | ||
26 | } | ||
27 | |||
28 | for (i = 0; i < 3; i++) { | ||
29 | nibble = ((line >> (i * 4)) & 0xf); | ||
30 | mach_alphanum(7 - i, nibble + ((nibble > 9) ? 55 : 48)); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | void print_seg_num(unsigned num) | ||
35 | { | ||
36 | int i; | ||
37 | unsigned int nibble; | ||
38 | |||
39 | for (i = 0; i < 8; i++) { | ||
40 | nibble = ((num >> (i * 4)) & 0xf); | ||
41 | |||
42 | mach_alphanum(7 - i, nibble + ((nibble > 9) ? 55 : 48)); | ||
43 | } | ||
44 | } | ||
45 | |||