os-k/src/kaleid/kernel/io/ports.h

24 lines
923 B
C
Raw Normal View History

//----------------------------------------------------------------------------//
// GNU GPL OS/K //
// //
// Authors: spectral` //
// NeoX //
// //
// Desc: Ports I/O //
//----------------------------------------------------------------------------//
2018-12-24 18:13:58 +01:00
#ifndef _KALKERN_IO_PORTS_H
#define _KALKERN_IO_PORTS_H
2019-01-01 13:09:57 +01:00
#ifndef _KALKERN_H
#include <kalkern.h>
2018-12-29 23:51:00 +01:00
#endif
2019-01-01 13:09:57 +01:00
#define WriteByteOnPort(port,val) asm volatile ("outb %1, %0" : : "dN" (port), "a" (value))
2019-01-01 13:09:57 +01:00
uchar ReadByteFromPort(port_t);
ushort ReadWordFromPort(port_t);
#endif