Enum pl_io_port_num

The enum pl_io_port_num contains a 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 these GPIO lines are unidirectional and require explicit configuration as outputs or inputs.

The enum pl_io_port_num consists of the following constants:

0- PL_IO_PORT_NUM_0

8-bit port 0, contains I/O lines 0-7. This is a virtual port.

During reads (io.portget, io.portstate(g)) and writes (io.portset, io.portstate(s)), each one of the port's eight lines is handled individually, starting with line 0 and ending with line 7. Hence, there is a small rolling delay in state writing and reading.

0- PL_IO_PORT_NUM_1

8-bit port 1, contains I/O lines 8-11. This is a virtual port.

During reads (io.portget, io.portstate(g)) and writes (io.portset, io.portstate(s)), each one of the port's four lines is handled individually, starting with line 0 and ending with line 1. Hence, there is a small rolling delay in state writing and reading.