summaryrefslogtreecommitdiff
path: root/kvmd/apps/otg/__init__.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-08-31 18:12:42 +0300
committerMaxim Devaev <[email protected]>2021-08-31 18:12:47 +0300
commit066a2a462558d2b7b5523fac6a02183ee50dbd62 (patch)
tree8a4226dba8198a51587acbe2be125ce6572c74ea /kvmd/apps/otg/__init__.py
parent49faa1d28ec97cf6d0a13db9c67b59ac93b3d2fb (diff)
configurable bcdUSB
Diffstat (limited to 'kvmd/apps/otg/__init__.py')
-rw-r--r--kvmd/apps/otg/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmd/apps/otg/__init__.py b/kvmd/apps/otg/__init__.py
index ab9f5b51..a7bdab40 100644
--- a/kvmd/apps/otg/__init__.py
+++ b/kvmd/apps/otg/__init__.py
@@ -172,10 +172,10 @@ def _cmd_start(config: Section) -> None: # pylint: disable=too-many-statements
gadget_path = join(f"{env.SYSFS_PREFIX}/sys/kernel/config/usb_gadget", config.otg.gadget)
_mkdir(gadget_path)
- _write(join(gadget_path, "idVendor"), f"0x{config.otg.vendor_id:X}")
- _write(join(gadget_path, "idProduct"), f"0x{config.otg.product_id:X}")
+ _write(join(gadget_path, "idVendor"), f"0x{config.otg.vendor_id:04X}")
+ _write(join(gadget_path, "idProduct"), f"0x{config.otg.product_id:04X}")
_write(join(gadget_path, "bcdDevice"), "0x0100")
- _write(join(gadget_path, "bcdUSB"), "0x0200")
+ _write(join(gadget_path, "bcdUSB"), f"0x{config.otg.usb_version:04X}")
lang_path = join(gadget_path, "strings/0x409")
_mkdir(lang_path)