I/O port access support functions support accesses or operations to the I/O devices. These include functions that read from or write to the I/O port of the specified address using the unit of byte or word, and a function that realizes a wait for a short time (micro wait) which is used for I/O device operations.
I/O port access support functions are provided as library functions or C language macros. These can be called from a task-independent portion or while task dispatching and interrupts are disabled.
In a system with separate I/O space and memory space, I/O port access functions access I/O space. In a system with memory-mapped I/O only, I/O port access functions access memory space. Using these functions will improve software portability and readability even in a memory-mapped I/O system.
None.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Writes data
in byte (8-bit) to the I/O port pointed by the address port
.
None.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Writes data
in a half-word (16-bit) to the I/O port pointed by the address port
.
None.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Writes data
in a word (32-bit) to the I/O port pointed by the address port
.
None.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Writes data
in a double-word (64-bit) to the I/O port pointed by the address port
.
Note that, in a system where I/O port cannot be accessed in double-word (64-bit) due to hardware constraint, data
is separated into shorter units than double-word (64-bit) before they are written.
There are many systems where I/O port cannot be accessed in double-word (64-bit) due to hardware constraint such as 32-bit or less I/O data bus. In such systems, the strict specification of out_d and in_d cannot be implemented; that is, they cannot process data
in one chunk of the specified bit width. In terms of the original purpose of this API, it is preferable not to implement the out_d and in_d or return an error at runtime. However, it is not practical to detect an error by determining the bus configuration at runtime, and it is often harmless to separate 64-bit data into 32-bit or narrower units before writing.
This is why the specification of out_d and in_d allow for the case where 64-bit data cannot be processed in one chunk. Therefore, whether out_d and in_d support the block access to 64-bit I/O port or not is implementation-dependent. If the block access to 64-bit I/O port is needed, the system hardware configuration and handling of out_d and in_d should be checked.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Reads data in a byte (8-bit) from the I/O port pointed by the address port
and returns it in the return parameter data
.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Reads data in a half-word (16-bit) from the I/O port pointed by the address port
and returns it in the return parameter data
.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Reads data in a word (32-bit) from the I/O port pointed by the address port
and returns it in the return parameter data
.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Reads data in a double-word (64-bit) from the I/O port pointed by the address port
and returns it in the return parameter data
.
Note that, in a system where I/O port cannot be accessed in one chunk of double-word (64-bit) due to hardware constraint, data is separated into shorter units than double-word (64-bit) before reading.
None.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Performs a micro wait for the specified interval (in microseconds).
This wait is usually implemented as a busy loop. This means that the micro wait occurs in the task RUNNING state rather than WAITING state.
The micro wait is easily influenced by the runtime environment, such as execution in RAM, execution in ROM, memory cache on or off, etc. The wait time is therefore not very accurate.
None.
None.
Only when all the service profile items below are set to be effective, this API can be used.
Performs a micro wait for the specified interval (in nanoseconds).
This wait is usually implemented as a busy loop. This means that the micro wait occurs in the task RUNNING state rather than WAITING state.
The micro wait is easily influenced by the runtime environment, such as execution in RAM, execution in ROM, memory cache on or off, etc. The wait time is therefore not very accurate.