t2:port_connect

port_connect


port_connect - Connect output connection

Description


void port_connect();
void port_connect(uint8 port, <PROTOCOL_IDENTIFIER>);

Try establish an output connection utilizing the default output protocol configured by the user, or using the output protocol specified by the optional arguments.

Optional Parameters


  • port: An valid output port identifier, accordingly table 1.
  • <PROTOCOL_IDENTIFIER>: An valid output protocol identifier, accordingly table 2.
Table 1
Index Port Designator
0 PORT_USB_C
6 PORT_BT_C
Table 2
Protocol Identifiers
PROTOCOL_AUTO
PROTOCOL_PS3
PROTOCOL_PS4
PROTOCOL_XB360
PROTOCOL_XB1
PROTOCOL_SWITCH
PROTOCOL_HID
PROTOCOL_WHEEL
PROTOCOL_WII

Return Value


No value is returned.

Examples


Example #1 port_connect() example

init {
    // Change the output protocol to USB Multi Interface HID.
    port_connect(PORT_USB_C, PROTOCOL_HID);
}

See Also

t2/port_connect.txt · Last modified: 2020/02/19 22:37 by sNAP