Site Tools
Sidebar
User's Manual
t2:port_turnoff
port_turnoff
port_turnoff - Turn off the device on a port
Description
void port_turnoff(uint8 port);
If supported, issue the command to turn off the input device connected on the port specified by the argument.
This command is mainly aimed to disconnect wireless connections. However, some wired devices supports soft turn off, such as the Xbox One controller. |
Parameters
- port: An valid port identifier, accordingly table 1.
Table 1 | |
Index | Port Designator |
---|---|
1 | PORT_USB_A |
2 | PORT_USB_B |
0 | PORT_USB_C |
3 | PORT_USB_D |
4 | PORT_BT_A |
5 | PORT_BT_B |
Return Value
No value is returned.
Examples
Example #1 port_turnoff() example
init { // If there is an device connected to Bluetooth-A ... if(port_status(PORT_BT_A, NULL, NULL)) { // ... disconnect it. port_turnoff(PORT_BT_A); } }
See Also
t2/port_turnoff.txt · Last modified: 2017/03/26 06:50 by J2Kbr