OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [include/] [asm-m68k/] [keyboard.h] - Blame information for rev 1774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1276 phoenix
/*
2
 *  linux/include/asm-m68k/keyboard.h
3
 *
4
 *  Created 3 Nov 1996 by Geert Uytterhoeven
5
 */
6
 
7
/*
8
 *  This file contains the m68k architecture specific keyboard definitions
9
 */
10
 
11
#ifndef __M68K_KEYBOARD_H
12
#define __M68K_KEYBOARD_H
13
 
14
#ifdef __KERNEL__
15
 
16
#include <linux/config.h>
17
#include <linux/kd.h>
18
#include <asm/machdep.h>
19
 
20
#ifdef CONFIG_Q40
21
#include <asm/q40_keyboard.h>
22
#endif
23
 
24
static __inline__ int kbd_setkeycode(unsigned int scancode,
25
                                     unsigned int keycode)
26
{
27
#ifdef CONFIG_Q40
28
    if (MACH_IS_Q40)
29
        return q40kbd_setkeycode(scancode,keycode);
30
#endif
31
    return -EOPNOTSUPP;
32
}
33
 
34
static __inline__ int kbd_getkeycode(unsigned int scancode)
35
{
36
#ifdef CONFIG_Q40
37
    if (MACH_IS_Q40)
38
        return q40kbd_getkeycode(scancode);
39
#endif
40
    return scancode > 127 ? -EINVAL : scancode;
41
}
42
 
43
static __inline__ char kbd_unexpected_up(unsigned char keycode)
44
{
45
#ifdef CONFIG_Q40
46
    if (MACH_IS_Q40)
47
        return q40kbd_unexpected_up(keycode);
48
#endif
49
    return 0200;
50
}
51
 
52
static __inline__ void kbd_leds(unsigned char leds)
53
{
54
    if (mach_kbd_leds)
55
        mach_kbd_leds(leds);
56
}
57
 
58
#define kbd_init_hw             mach_keyb_init
59
#define kbd_translate           mach_kbd_translate
60
#define kbd_rate                mach_kbdrate
61
 
62
#define kbd_sysrq_xlate         mach_sysrq_xlate
63
 
64
/* resource allocation */
65
#define kbd_request_region()
66
#define kbd_request_irq(handler)
67
 
68
/* How to access the keyboard macros on this platform.  */
69
#define kbd_read_input() in_8(KBD_DATA_REG)
70
#define kbd_read_status() in_8(KBD_STATUS_REG)
71
#define kbd_write_output(val) out_8(KBD_DATA_REG, val)
72
#define kbd_write_command(val) out_8(KBD_CNTL_REG, val)
73
extern unsigned int SYSRQ_KEY;
74
 
75
#endif /* __KERNEL__ */
76
 
77
#endif /* __M68K_KEYBOARD_H */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.