Function to define a virtual input and output zone.
These are 16-bit entities not directly connected to any physical device but with the possibilities to have its own value forced.
Access is the same as for normal inp_w and out_w. It is the user's responsibility to set the actual state of the inputs with the appropriate instruction.
The virtual block will occupy all addresses between ioBase and(ioBase + maximum(nWordIn, nWordOut) - 1).
Syntax |
i32 virt_io (i32 ioBase, i32 nWordIn, i32 nWordOut) |
||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ioBase |
Minor index of the I/O group |
||||||||||||||||
nWordIn |
Number of input words handled for this block |
||||||||||||||||
nWordOut |
Number of output words handled for this block |
||||||||||||||||
Result |
Returns:
|
||||||||||||||||
Validity |
Task |
||||||||||||||||
Note |
Maximum 4 different blocks can be defined |
Example of use:
|