Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion crates/fbuild-serial/src/boards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,9 @@ fn family_from_usb_profile(
if profile.role == UsbDeviceRole::UsbUartBridge {
return Some(Esp32ExternalUart);
}
if profile.platform.as_deref() == Some("espressif32")
// PlatformIO calls this platform `espressif32`, while the published
// FastLED/boards registry uses its shorter canonical value `esp32`.
if matches!(profile.platform.as_deref(), Some("espressif32" | "esp32"))
&& profile.role == UsbDeviceRole::RuntimeCdc
{
return Some(Esp32NativeUsbCdc);
Expand Down Expand Up @@ -987,6 +989,17 @@ mod tests {
family_from_usb_profile(&bridge),
Some(BoardFamily::Esp32ExternalUart)
);

let registry_esp = transport_profile(
UsbDeviceRole::RuntimeCdc,
Some("esp32"),
Some("esp32-s3"),
"hardware",
);
assert_eq!(
family_from_usb_profile(&registry_esp),
Some(BoardFamily::Esp32NativeUsbCdc)
);
}

#[test]
Expand Down
Loading