1 /* $Id: portio.c,v 1.3 2000/03/04 20:45:34 ea Exp $
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/hal/x86/portio.c
6 * PURPOSE: Port I/O functions
7 * PROGRAMMER: Eric Kohl (ekohl@abo.rhein-zeitung.de)
12 #include <ddk/ntddk.h>
13 #include <internal/halio.h>
16 /* FUNCTIONS ****************************************************************/
20 READ_PORT_BUFFER_UCHAR (PUCHAR Port
,
24 insb ((ULONG
)Port
, Buffer
, Count
);
30 READ_PORT_BUFFER_ULONG (PULONG Port
,
34 insl ((ULONG
)Port
, Buffer
, Count
);
40 READ_PORT_BUFFER_USHORT (PUSHORT Port
,
44 insw ((ULONG
)Port
, Buffer
, Count
);
50 READ_PORT_UCHAR (PUCHAR Port
)
52 return inb_p ((ULONG
)Port
);
58 READ_PORT_ULONG (PULONG Port
)
60 return inl_p ((ULONG
)Port
);
66 READ_PORT_USHORT (PUSHORT Port
)
68 return inw_p ((ULONG
)Port
);
74 WRITE_PORT_BUFFER_UCHAR (PUCHAR Port
,
78 outsb ((ULONG
)Port
, Buffer
, Count
);
84 WRITE_PORT_BUFFER_ULONG (PULONG Port
,
88 outsl ((ULONG
)Port
, Buffer
, Count
);
94 WRITE_PORT_BUFFER_USHORT (PUSHORT Port
,
98 outsw ((ULONG
)Port
, Buffer
, Count
);
104 WRITE_PORT_UCHAR (PUCHAR Port
,
107 outb_p ((ULONG
)Port
, Value
);
113 WRITE_PORT_ULONG (PULONG Port
,
116 outl_p ((ULONG
)Port
, Value
);
122 WRITE_PORT_USHORT (PUSHORT Port
,
125 outw_p ((ULONG
)Port
, Value
);