From e4552581bfcb599c13ec2041b55cc3b3671139f4 Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 13 Aug 2024 19:55:37 +0100 Subject: [PATCH] Made resolving of pin type case-insensitive --- .../TargetDescription/TargetDescriptionFile.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/Targets/TargetDescription/TargetDescriptionFile.cpp b/src/Targets/TargetDescription/TargetDescriptionFile.cpp index 7a380bfb..f71fb981 100644 --- a/src/Targets/TargetDescription/TargetDescriptionFile.cpp +++ b/src/Targets/TargetDescription/TargetDescriptionFile.cpp @@ -1092,17 +1092,19 @@ namespace Targets::TargetDescription TargetPinDescriptor TargetDescriptionFile::targetPinDescriptorFromPin(const Pin& pin) { static const auto resolvePinType = [] (const std::string& pad) -> TargetPinType { + const auto padLower = StringService::asciiToLower(pad); + if ( - pad.find("vcc") == 0 - || pad.find("avcc") == 0 - || pad.find("aref") == 0 - || pad.find("avdd") == 0 - || pad.find("vdd") == 0 + padLower.find("vcc") == 0 + || padLower.find("avcc") == 0 + || padLower.find("aref") == 0 + || padLower.find("avdd") == 0 + || padLower.find("vdd") == 0 ) { return TargetPinType::VCC; } - if (pad.find("gnd") == 0) { + if (padLower.find("gnd") == 0) { return TargetPinType::GND; }