USB ======== .. py:class:: USB Controll power state of USB devices .. py:classmethod:: all() List all controllable USB devices .. code-block:: python :emphasize-lines: 3 from lager import USB print(USB.all()) :return: available USB devices :rtype: str .. py:classmethod:: find(name) Find USB device by name .. code-block:: python :emphasize-lines: 3 from lager import USB print(f"device found: {USB.find('ftdi')}") :param str name: USB device name :return: device found :rtype: bool .. py:method:: is_enabled() Is a USB device enabled. .. code-block:: python :emphasize-lines: 4 from lager import USB dev = USB() print(f"is device enabeld: {dev.is_enabled()}") :return: device enabled :rtype: bool .. py:method:: on() Power device on. .. code-block:: python :emphasize-lines: 4 from lager import USB dev = USB() dev.on() .. py:method:: off() Power device off. .. code-block:: python :emphasize-lines: 4 from lager import USB dev = USB() dev.off() .. py:method:: toggle() Toggle power state of device. .. code-block:: python :emphasize-lines: 4 from lager import USB dev = USB() dev.toggle()