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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [include/] [keyboard.h] - Blame information for rev 690

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

Line No. Rev Author Line
1 2 marcus.erl
#if KBD_ENABLED
2
 
3
/*
4
 * keyboard controller registers
5
 */
6
#define KBD_STATUS_REG      (unsigned int) KBD_BASE_ADD+0x4
7
#define KBD_CNTL_REG        (unsigned int) KBD_BASE_ADD+0x4
8
#define KBD_DATA_REG        (unsigned int) KBD_BASE_ADD+0x0
9
/*
10
 * controller commands
11
 */
12
#define KBD_READ_MODE       (unsigned int) 0x20
13
#define KBD_WRITE_MODE      (unsigned int) 0x60
14
#define KBD_SELF_TEST       (unsigned int) 0xAA
15
#define KBD_SELF_TEST2      (unsigned int) 0xAB
16
#define KBD_CNTL_ENABLE     (unsigned int) 0xAE
17
/*
18
 * keyboard commands
19
 */
20
#define KBD_ENABLE          (unsigned int) 0xF4
21
#define KBD_DISABLE         (unsigned int) 0xF5
22
#define KBD_RESET           (unsigned int) 0xFF
23
/*
24
 * keyboard replies
25
 */
26
#define KBD_ACK             (unsigned int) 0xFA
27
#define KBD_POR             (unsigned int) 0xAA
28
/*
29
 * status register bits
30
 */
31
#define KBD_OBF             (unsigned int) 0x01
32
#define KBD_IBF             (unsigned int) 0x02
33
#define KBD_GTO             (unsigned int) 0x40
34
#define KBD_PERR            (unsigned int) 0x80
35
/*
36
 * keyboard controller mode register bits
37
 */
38
#define KBD_EKI             (unsigned int) 0x01
39
#define KBD_SYS             (unsigned int) 0x04
40
#define KBD_DMS             (unsigned int) 0x20
41
#define KBD_KCC             (unsigned int) 0x40
42
 
43
#define TIMEOUT_CONST   500000
44
 
45
extern volatile int kbd_tail;
46
extern volatile int kbd_head;
47
extern volatile int kbd_buf[KBDBUF_SIZE];
48
 
49
extern int kbd_init(void);
50
 
51
#endif /* KBD_ENABLED */

powered by: WebSVN 2.1.0

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