ReactOS Fundraising Campaign 2012
 
€ 4,060 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

portio.c
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         ReactOS HAL
00003  * LICENSE:         GPL - See COPYING in the top level directory
00004  * FILE:            hal/halx86/generic/portio.c
00005  * PURPOSE:         I/O Functions for access to ports
00006  * PROGRAMMERS:     Alex Ionescu (alex.ionescu@reactos.org)
00007  */
00008 
00009 /* INCLUDES ******************************************************************/
00010 
00011 #include <hal.h>
00012 #define NDEBUG
00013 #include <debug.h>
00014 
00015 //
00016 // HAL Port to Inlined Port
00017 //
00018 #define H2I(Port) PtrToUshort(Port)
00019 
00020 /* FUNCTIONS *****************************************************************/
00021 
00022 VOID
00023 NTAPI
00024 READ_PORT_BUFFER_UCHAR(IN PUCHAR Port,
00025                        OUT PUCHAR Buffer,
00026                        IN ULONG Count)
00027 {
00028     __inbytestring(H2I(Port), Buffer, Count);
00029 }
00030 
00031 VOID
00032 NTAPI
00033 READ_PORT_BUFFER_USHORT(IN PUSHORT Port,
00034                         OUT PUSHORT Buffer,
00035                         IN ULONG Count)
00036 {
00037     __inwordstring(H2I(Port), Buffer, Count);
00038 }
00039 
00040 VOID
00041 NTAPI
00042 READ_PORT_BUFFER_ULONG(IN PULONG Port,
00043                        OUT PULONG Buffer,
00044                        IN ULONG Count)
00045 {
00046     __indwordstring(H2I(Port), Buffer, Count);
00047 }
00048 
00049 UCHAR
00050 NTAPI
00051 READ_PORT_UCHAR(IN PUCHAR Port)
00052 {
00053     return __inbyte(H2I(Port));
00054 }
00055 
00056 USHORT
00057 NTAPI
00058 READ_PORT_USHORT(IN PUSHORT Port)
00059 {
00060     return __inword(H2I(Port));
00061 }
00062 
00063 ULONG
00064 NTAPI
00065 READ_PORT_ULONG(IN PULONG Port)
00066 {
00067     return __indword(H2I(Port));
00068 }
00069 
00070 VOID
00071 NTAPI
00072 WRITE_PORT_BUFFER_UCHAR(IN PUCHAR Port,
00073                         IN PUCHAR Buffer,
00074                         IN ULONG Count)
00075 {
00076     __outbytestring(H2I(Port), Buffer, Count);
00077 }
00078 
00079 VOID
00080 NTAPI
00081 WRITE_PORT_BUFFER_USHORT(IN PUSHORT Port,
00082                          IN PUSHORT Buffer,
00083                          IN ULONG Count)
00084 {
00085     __outwordstring(H2I(Port), Buffer, Count);
00086 }
00087 
00088 VOID
00089 NTAPI
00090 WRITE_PORT_BUFFER_ULONG(IN PULONG Port,
00091                         IN PULONG Buffer,
00092                         IN ULONG Count)
00093 {
00094     __outdwordstring(H2I(Port), Buffer, Count);
00095 }
00096 
00097 VOID
00098 NTAPI
00099 WRITE_PORT_UCHAR(IN PUCHAR Port,
00100                  IN UCHAR Value)
00101 {
00102     __outbyte(H2I(Port), Value);
00103 }
00104 
00105 VOID
00106 NTAPI
00107 WRITE_PORT_USHORT(IN PUSHORT Port,
00108                   IN USHORT Value)
00109 {
00110     __outword(H2I(Port), Value);
00111 }
00112 
00113 VOID
00114 NTAPI
00115 WRITE_PORT_ULONG(IN PULONG Port,
00116                  IN ULONG Value)
00117 {
00118     __outdword(H2I(Port), Value);
00119 }
00120 
00121 /* EOF */

Generated on Tue May 22 2012 04:31:52 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.