Enum pl_io_num contains the list of constants that refer to I/O lines available on this platform. Use these constants when selecting the line with the io object (see the io.num property).
All I/O lines of the EM1202 platform require explicit configuration as inputs or outputs -- this is done through the io.enabledproperty of the io object. On power-up, all lines are configured as inputs. When the line is configured for input its output driver is tri-stated. When the line is configured for output, its output driver is enabled. It is possible to read the state of the line even when it is working as an output.
Certain lines automatically become inputs and outputs in certain modes of operation -- see below for details.
Enum pl_io_num for this platform includes the following constants:
| PL_IO_NUM_0: | Selects general-purpose I/O line 0 (P0.0). By default, this line also acts as RTS/W0out/cout output of the serial port 0 (this can be remapped using ser.rtsmap property). When the line is used as RTS/W0out/cout you still need to configure it as output- this won't happen automatically. |
| PL_IO_NUM_1: | Selects general-purpose I/O line 1 (P0.1). By default, this line also acts as RTS/W0out/cout output of the serial port 1 (this can be remapped using ser.rtsmap property). When the line is used as RTS/W0out/cout you still need to configure it as output- this won't happen automatically. |
| PL_IO_NUM_2: | Selects general-purpose I/O line 2 (P0.2). By default, this line also acts as RTS/W0out/cout output of the serial port 2 (this can be remapped using ser.rtsmap property). When the line is used as RTS/W0out/cout you still need to configure it as output- this won't happen automatically. |
| PL_IO_NUM_3: | Selects general-purpose I/O line 3 (P0.3). By default, this line also acts as RTS/W0out/cout output of the serial port 3 (this can be remapped using ser.rtsmap property). When the line is used as RTS/W0out/cout you still need to configure it as output- this won't happen automatically. |
| PL_IO_NUM_4: | Selects general-purpose I/O line 4 (P0.4). |
| PL_IO_NUM_5: | Selects general-purpose I/O line 5 (P0.5). |
| PL_IO_NUM_6: | Selects general-purpose I/O line 6 (P0.6). |
| PL_IO_NUM_7: | Selects general-purpose I/O line 7 (P0.7). |
| PL_IO_NUM_8_RX0: | Selects general-purpose I/O line 8 (P1.0). This line is also an RX/W1in/din input of the serial port 0. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the line is automatically configured to be an input 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as input by the application- this will not happen automatically. |
| PL_IO_NUM_9_TX0: | Selects general-purpose I/O line 9 (P1.1). This line is also a TX/W1out/dout output of the serial port 0. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as output by the application- this will not happen automatically. |
| PL_IO_NUM_10_RX1: | Selects general-purpose I/O line 10 (P1.2). This line is also an RX/W0&1in/din input of the serial port 1. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the line is automatically configured to be an input 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as input by the application- this will not happen automatically. |
| PL_IO_NUM_11_TX1: | Selects general-purpose I/O line 11 (P1.3). This line is also a TX/W1out/dout output of the serial port 1. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as output by the application- this will not happen automatically. |
| PL_IO_NUM_12_RX2: | Selects general-purpose I/O line 12 (P1.4). This line is also an RX/W0&1in/din input of the serial port 2. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the line is automatically configured to be an input 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as input by the application- this will not happen automatically. |
| PL_IO_NUM_13_TX2: | Selects general-purpose I/O line 13 (P1.5). This line is also a TX/W1out/dout output of the serial port 2. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as output by the application- this will not happen automatically. |
| PL_IO_NUM_14_RX3: | Selects general-purpose I/O line 14 (P1.6). This line is also an RX/W0&1in/din input of the serial port 3. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the line is automatically configured to be an input 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as input by the application- this will not happen automatically. |
| PL_IO_NUM_15_TX3: | Selects general-purpose I/O line 15 (P1.7). This line is also a TX/W1out/dout output of the serial port 3. When the serial port is in the UART mode (ser.mode= 0- PL_SER_MODE_UART) the 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). When the serial port is in the Wiegand or clock/data mode (ser.mode= 1- PL_SER_MODE_WIEGAND or ser.mode= 2- PL_SER_MODE_CLOCKDATA) the line has to be configured as output by the application- this will not happen automatically. |
| PL_IO_NUM_16_INT0: | Selects general-purpose I/O line 16 (P2.0). By default, this line also acts as CTS/W0&1in/cin input of the serial port 0 (this can be remapped using ser.ctsmap property). When the line is used as CTS/W0&1in/cin you still need to configure it as input- this won't happen automatically. |
| PL_IO_NUM_17_INT1: | Selects general-purpose I/O line 17 (P2.1). By default, this line also acts as CTS/W0&1in/cin input of the serial port 1 (this can be remapped using ser.ctsmap property). When the line is used as CTS/W0&1in/cin you still need to configure it as input- this won't happen automatically. |
| PL_IO_NUM_18_INT2: | Selects general-purpose I/O line 18 (P2.2). By default, this line also acts as CTS/W0&1in/cin input of the serial port 2 (this can be remapped using ser.ctsmap property). When the line is used as CTS/W0&1in/cin you still need to configure it as input- this won't happen automatically. |
| PL_IO_NUM_19_INT3: | Selects general-purpose I/O line 19 (P2.3). By default, this line also acts as CTS/W0&1in/cin input of the serial port 3 (this can be remapped using ser.ctsmap property). When the line is used as CTS/W0&1in/cin you still need to configure it as input- this won't happen automatically. |
| PL_IO_NUM_20_INT4: | Selects general-purpose I/O line 20 (P2.4). |
| PL_IO_NUM_21_INT5: | Selects general-purpose I/O line 21 (P2.5). |
| PL_IO_NUM_22_INT6: | Selects general-purpose I/O line 22 (P2.6). |
| PL_IO_NUM_23_INT7: | Selects general-purpose I/O line 23 (P2.7). |
| PL_IO_NUM_24: | Selects general-purpose I/O line 24 (does not belong to any 8-bit port). |
| PL_IO_NUM_25: | Selects general-purpose I/O line 25 (does not belong to any 8-bit port). |
| PL_IO_NUM_26: | Selects general-purpose I/O line 26 (does not belong to any 8-bit port). |
| PL_IO_NUM_27: | Selects general-purpose I/O line 27 (does not belong to any 8-bit port). |
| PL_IO_NUM_28: | Selects general-purpose I/O line 28 (does not belong to any 8-bit port). |
| PL_IO_NUM_29_CO: | Selects general-purpose I/O line 29 (does not belong to any 8-bit port). This line is also used by the beep object to generate square wave output that is primarily intended for driving beeper (buzzer). When the beeper pattern stars playing, the line is configured as output automatically. When the beeper pattern stops playing, the output returns to the input/output and high/low state that it had before the pattern started playing. |
| PL_IO_NUM_30: | Selects general-purpose I/O line 30 (does not belong to any 8-bit port). |
| PL_IO_NUM_31: | Selects general-purpose I/O line 31 (does not belong to any 8-bit port). |