Enum pl_io_port_num

Top  Previous  Next

Enum pl_io_port_num contains the list of available 8-bit GPIO ports. Use these constants when selecting the port with the io. object (see the io.portnum property).

Note that GPIO lines are of unidirectional type and require explicit configuration as outputs or inputs.


On this platform, the only existing 8-bit port is virtual. In reality, the 8 I/O lines of this port belong to a 32-bit hardware port of the CPU.


Enum pl_io_port_num includes the following constant:

0- PL_IO_PORT_NUM_0:8-bit port 0 (P0). Contains I/O lines 24-31. This is a virtual port. During writes (io.portset, io.portstate(s)), all lines with their new value equal to LOW are cleared first, and then the lines with their new value equal to HIGH are set next. Hence, writing is a two-step process that introduces a small delay in LOW->HIGH transitions on the port's lines. Port reads (io.portget, io.portstate(g)) are performed cleanly, in a single step.