(output_file, device_properties: ConfigParser)
| 315 | |
| 316 | |
| 317 | def 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 | |
| 331 | def write_bluetooth_variables(output_file, device_properties: ConfigParser): |
| 332 | idf_target = get_property_or_exit(device_properties, "hardware", "target").lower() |
no test coverage detected