MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / write_usb_variables

Function write_usb_variables

device.py:317–329  ·  view source on GitHub ↗
(output_file, device_properties: ConfigParser)

Source from the content-addressed store, hash-verified

315
316
317def write_usb_variables(output_file, device_properties: ConfigParser):
318 has_tiny_usb = get_boolean_property_or_false(device_properties, "hardware", "tinyUsb")
319 if has_tiny_usb:
320 output_file.write("# TinyUSB\n")
321 output_file.write("CONFIG_TINYUSB_MSC_ENABLED=y\n")
322 output_file.write("CONFIG_TINYUSB_MSC_MOUNT_PATH=\"/sdcard\"\n")
323 idf_target = get_property_or_exit(device_properties, "hardware", "target").lower()
324 if idf_target == "esp32p4":
325 # P4 has two USB-DWC controllers (HS/UTMI and FS/FSLS). esp_tinyusb defaults to
326 # RHPORT_HS (UTMI), which is the same controller claimed by usbhost0's
327 # peripheral-map=<0> (USB-A). Force RHPORT_FS so TinyUSB device mode binds to
328 # the FS/FSLS controller (USB-C OTG on Tab5), avoiding the conflict.
329 output_file.write("CONFIG_TINYUSB_RHPORT_FS=y\n")
330
331def write_bluetooth_variables(output_file, device_properties: ConfigParser):
332 idf_target = get_property_or_exit(device_properties, "hardware", "target").lower()

Callers 1

write_propertiesFunction · 0.85

Calls 3

get_property_or_exitFunction · 0.70
writeMethod · 0.45

Tested by

no test coverage detected