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
18 changes: 17 additions & 1 deletion crates/fbuild-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ impl Platform {
Some(Self::Ch32v)
} else if s.contains("nordicnrf52") {
Some(Self::NordicNrf52)
} else if s.contains("nxplpc") {
// FastLED/fbuild#XXX: GitHub URL form is `platform-nxp-lpc8xx`
// (hyphenated). PlatformIO registry name is `nxplpc` (no separator).
// Match both so a `platform = https://github.com/FastLED/
// platform-nxp-lpc8xx.git#<sha>` spec in platformio.ini resolves.
} else if s.contains("nxplpc") || s.contains("nxp-lpc") {
Some(Self::NxpLpc)
} else if s.contains("renesas") {
Some(Self::RenesasRa)
Expand Down Expand Up @@ -570,6 +574,18 @@ mod tests {
),
Some(Platform::AtmelAvr)
);
// FastLED LPC8xx fork uses the hyphenated GitHub form
// `platform-nxp-lpc8xx` (PlatformIO registry name is `nxplpc`).
assert_eq!(
Platform::from_platform_str(
"https://github.com/FastLED/platform-nxp-lpc8xx.git#12265f765aebd3893465d6d7ad76be66d89ba015"
),
Some(Platform::NxpLpc)
);
assert_eq!(
Platform::from_platform_str("nxplpc"),
Some(Platform::NxpLpc)
);
}

#[test]
Expand Down
Loading