Port I/O
Real-time systems require the ability to control, read, and write data to hardware devices. The RTX64 port I/O programming interfaces allow data movement in the I/O space of a processor by a user process without the need to switch to a kernel-mode code. This functionality eliminates the need for creating a device driver for every device that must be accessed. Additionally, it eliminates the latencies associated with requesting device driver services for every device access.
Port I/O provides an alternate method of communicating directly with hardware. The I/O address space is a feature found on Intel processors where each address represents an 8-bit "port." Each port typically corresponds to an 8-bit control register on a hardware device. While sequential addresses can represent the bytes in a multi-byte port, hardware designers usually employ designs that have a single-byte port, and multi-byte values are entered as sequential single-byte writes to the port address. For details about a particular device, you should consult its programming reference documentation.
Access to port I/O devices must be enabled prior to attempting any data transfers. This is accomplished with the RtEnablePortIo function by passing in the port I/O address range that will be accessed. Subsequent to enabling access, the RtWrite* and RtRead* functions, discussed below, may be used to transfer data to and from the enabled port I/O space.
Topics: