port_turnoff - Turn off the device on a port
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. |
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 |
No value is returned.
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); } }