Jump to content

VDHPortIO: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
No edit summary
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
This function is used to perform input/output operations to a specified local port.
This function is used to perform input/output operations to a specified local port.


;Parameters:Pointer to a PORT_IO structure.
==Parameters==
;Exit:Return code.
Pointer to a PORT_IO structure.
;Structures
==Exit==
<code>
Return code.
==Structures==
<pre>
  typedef struct port_io_s
  typedef struct port_io_s
  {
  {
Line 13: Line 15:
     ulong_t flags;  (Input)
     ulong_t flags;  (Input)
  } PORT_IO;
  } PORT_IO;
</code>       
</pre>       
:port - indicates which port to read to, or write from.
:port - indicates which port to read to, or write from.
:data - contains the data read from a read request, or the data to write if a write request.
:data - contains the data read from a read request, or the data to write if a write request.
Line 24: Line 26:
:*IO_WRITE_DWORD Write a dword to the port
:*IO_WRITE_DWORD Write a dword to the port


[[Category:Virtual Device Driver Helps]]
[[Category:Virtual Device Drivers]]

Latest revision as of 05:45, 18 May 2025

Perform IO to a specified port.

This function is used to perform input/output operations to a specified local port.

Parameters

Pointer to a PORT_IO structure.

Exit

Return code.

Structures

 typedef struct port_io_s
 {
    ulong_t port;   (Input)
    ulong_t data;   (Input/Output)
    ulong_t flags;  (Input)
 } PORT_IO;
port - indicates which port to read to, or write from.
data - contains the data read from a read request, or the data to write if a write request.
flags - indicate what operation to perform.
  • IO_READ_BYTE Read a byte from the port
  • IO_READ_WORD Read a word from the port
  • IO_READ_DWORD Read a dword from the port
  • IO_WRITE_BYTE Write a byte to the port
  • IO_WRITE_WORD Write a word to the port
  • IO_WRITE_DWORD Write a dword to the port