Enum pl_io_num

Top  Previous  Next

Enum pl_io_num contains the list of constants that refer to available GPIO lines. Use these constants when selecting the line with the io. object (see the io.num property).

Note that GPIO lines are of unidirectional type and require explicit configuration as outputs or inputs. Some lines are configured as inputs or outputs automatically — see the notes at the bottom of the page.

 

note_warning-wt

The DS1206N-RS board and the DS1206 controller have the RS232 transceiver IC onboard. This IC "dictates" the GPIO line direction for certain lines. Do not try to use GPIO lines 0, 2, 4, and 6  as outputs — this can permanently damage the hardware.

 

Enum pl_io_num includes the following constants:

0- PL_IO_NUM_0_RX0_INT0(1):General-purpose I/O line 0 (P0.0). This line is also the RX/W1in/din input of the serial port(3) 0 and the interrupt line 0.
1- PL_IO_NUM_1_TX0_INT1(2):General-purpose I/O line 1 (P0.1). This line is also the TX/W1out/dout output of the serial port 0 and the interrupt line 1.
2- PL_IO_NUM_2_RX1_INT2(1):General-purpose I/O line 2 (P0.2). This line is also the RX/W0&1in/din input of the serial port 1 and the interrupt line 2.
3- PL_IO_NUM_3_TX1_INT3(2):General-purpose I/O line 3 (P0.3). This line is also the TX/W1out/dout output of the serial port 1 and the interrupt line 3.
4- PL_IO_NUM_4_RX2_INT4(1):General-purpose I/O line 4 (P0.4). This line is also the RX/W0&1in/din input of the serial port 2 and the interrupt line 4.
5- PL_IO_NUM_5_TX2_INT5(2):General-purpose I/O line 5 (P0.5). This line is also the TX/W1out/dout output of the serial port 2 and the interrupt line 5.
6- PL_IO_NUM_6_RX3_INT6(1):General-purpose I/O line 6 (P0.6). This line is also the RX/W0&1in/din input of the serial port 3 and the interrupt line 6.
7- PL_IO_NUM_7_EMPTY:Not implemented.
8- PL_IO_NUM_8_PWROUT:Controls the power output on pin 9 of the DB9M connector (this applies only to DS1206N-RS and DS1206 devices). Power will be  ON when this output is enabled (io.enabled= 1- YES) and set to HIGH (io.state= 1- HIGH).
PL_IO_NULL:This is a NULL line that does not physically exist. The state of this line is always detected as LOW. Setting this line has no effect.

 

Notes:

1.When a serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) this line is automatically configured to be an input when this serial port is enabled (ser.enabled= 1- YES) and returns to the previous input/output and high/low state when this serial port is closed (ser.enabled= 0- NO).

2. When a serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) this line is automatically configured to be an output when the serial port is enabled (ser.enabled= 1- YES) and returns to the previous input/output and high/low state when the serial port is closed (ser.enabled= 0- NO).

3. In this list, the term "serial port" actually refers to "serial channel".