18 lines
506 B
C
18 lines
506 B
C
#ifndef __IO_H
|
|
#define __IO_H
|
|
extern void outportb(unsigned short _port, unsigned char _data);
|
|
extern unsigned char inportb(unsigned short _port);
|
|
|
|
extern void outportl(unsigned short _port, unsigned long _data);
|
|
extern unsigned long inportl(unsigned long _port);
|
|
|
|
extern void outportw (unsigned short _port, unsigned short _data);
|
|
|
|
extern void inportsl(unsigned short _port, unsigned int *buffer, int count);
|
|
|
|
static inline void io_wait(void) {
|
|
__asm__ volatile("outb %%al, $0x80" : : "a"(0));
|
|
}
|
|
|
|
#endif
|