USB host support (#527)

This commit is contained in:
Shadowtrance
2026-06-04 07:10:37 +10:00
committed by GitHub
parent a59fbf4ed5
commit 3dcc95f6f3
46 changed files with 2409 additions and 121 deletions
+13
View File
@@ -350,6 +350,18 @@ def write_bluetooth_variables(output_file, device_properties: ConfigParser):
# rapid connect/disconnect/re-pair loop.
output_file.write("CONFIG_BT_NIMBLE_NVS_PERSIST=y\n")
def write_usbhost_variables(output_file, device_properties: ConfigParser):
has_usbhost = get_boolean_property_or_false(device_properties, "hardware", "usbHostEnabled")
if has_usbhost:
output_file.write("# USB Host\n")
output_file.write("CONFIG_FATFS_VOLUME_COUNT=6\n")
output_file.write("CONFIG_VFS_MAX_COUNT=10\n")
output_file.write("CONFIG_USB_HOST_HUBS_SUPPORTED=y\n")
output_file.write("CONFIG_USB_HOST_DEBOUNCE_DELAY_MS=500\n")
output_file.write("CONFIG_USB_HOST_RESET_HOLD_MS=100\n")
output_file.write("CONFIG_USB_HOST_RESET_RECOVERY_MS=100\n")
output_file.write("CONFIG_USB_HOST_SET_ADDR_RECOVERY_MS=500\n")
def write_custom_sdkconfig(output_file, device_properties: ConfigParser):
if "sdkconfig" in device_properties.sections():
output_file.write("# Custom\n")
@@ -369,6 +381,7 @@ def write_properties(output_file, device_properties: ConfigParser, device_id: st
write_performance_improvements(output_file, device_properties)
write_usb_variables(output_file, device_properties)
write_bluetooth_variables(output_file, device_properties)
write_usbhost_variables(output_file, device_properties)
write_custom_sdkconfig(output_file, device_properties)
write_lvgl_variables(output_file, device_properties)