kbc.h
1 |
#ifndef __TEST4_H
|
---|---|
2 |
#define __TEST4_H
|
3 |
|
4 |
#include <minix/sysutil.h> |
5 |
|
6 |
#define KB_IRQ 0x01 |
7 |
#define TIMER0_IRQ 0x00 |
8 |
#define DELAY_US 20000 |
9 |
#define STAT_REG 0x64 |
10 |
#define DATA_REG 0x60 |
11 |
#define LEDS_SWITCH 0xED |
12 |
#define BIT(n) (0x01<<n) |
13 |
#define OBF BIT(0) |
14 |
#define IBF BIT(1) |
15 |
#define SYS BIT(2) |
16 |
#define A2 BIT(3) |
17 |
#define INH BIT(4) |
18 |
#define AUX BIT(5) |
19 |
#define TO_ERR BIT(6) |
20 |
#define PAR_ERR BIT(7) |
21 |
|
22 |
int test_scan(void); |
23 |
int test_leds(unsigned short n, unsigned short *leds); |
24 |
int write_kbc(unsigned long port, unsigned char byte); |
25 |
unsigned long KBCsubscribe_int(void ); |
26 |
int read_kbc();
|
27 |
int KBCunsubscribe_int();
|
28 |
unsigned long timer_subscribe_int(void); |
29 |
int timer_unsubscribe_int();
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
#endif __TEST4_H
|