class USB¶
Control the USB interface. The USB interface is most commonly used as a service interface. If the device would activate low power mode via (obs.lightsleep) the USB connection would be lost. To prevent this from happening the device does not enter lightsleep mode when the USB interface is connected to a PC.
When de USB interface is turned off the device can not be accessed via USB, unit it is turned on again.
Methods¶
-
usb.
power
(state: bool)¶ Set the usb peripheral on or off. Turn off for low power consumption mode.
bool
is 1 or 0, True or False, corresponding to on and off.
Example¶
The following example disables the usb interface
import omc048
p1 = omc048.usb()
p1.power(False)