2018-12-20 18:03:39 +01:00
|
|
|
//----------------------------------------------------------------------------//
|
|
|
|
// 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
|
2018-12-20 18:03:39 +01:00
|
|
|
|
2019-01-01 13:09:57 +01:00
|
|
|
#ifndef _KALKERN_H
|
|
|
|
#include <kalkern.h>
|
2018-12-29 23:51:00 +01:00
|
|
|
#endif
|
2018-12-20 18:03:39 +01:00
|
|
|
|
2019-01-01 13:09:57 +01:00
|
|
|
#define WriteByteOnPort(port,val) asm volatile ("outb %1, %0" : : "dN" (port), "a" (value))
|
2018-12-20 18:03:39 +01:00
|
|
|
|
2019-01-01 13:09:57 +01:00
|
|
|
uchar ReadByteFromPort(port_t);
|
|
|
|
ushort ReadWordFromPort(port_t);
|
2018-12-20 18:03:39 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|