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
|
|
|
|
2018-12-29 23:51:00 +01:00
|
|
|
#ifndef _KALCOMM_COMMON_H
|
2018-12-30 20:13:56 +01:00
|
|
|
#include <kaleid/common/common.h>
|
2018-12-29 23:51:00 +01:00
|
|
|
#endif
|
2018-12-20 18:03:39 +01:00
|
|
|
|
2018-12-29 23:51:00 +01:00
|
|
|
#define DosWriteByteOnPort(port,val) asm volatile ("outb %1, %0" : : "dN" (port), "a" (value))
|
2018-12-20 18:03:39 +01:00
|
|
|
|
2018-12-29 23:51:00 +01:00
|
|
|
uchar DosReadByteFromPort(port_t);
|
|
|
|
ushort DosReadWordFromPort(port_t);
|
2018-12-20 18:03:39 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|