Added pin count validation for QFP, QFN, DIP, SOIC and SSOP target packages, in the TDF validation script.

This commit is contained in:
Nav
2021-07-09 23:40:33 +01:00
parent 1c1e07eaf8
commit 86134fead1

View File

@@ -426,6 +426,16 @@ class TargetDescriptionFile
} }
} }
} }
if (in_array($pinout->type, [Pinout::TYPE_SOIC, Pinout::TYPE_DIP, Pinout::TYPE_SSOP])
&& count($pinout->pins) % 2 != 0
) {
$failures[] = 'DIP/SOIC/SSOP pinout (' . $pinout->name . ') pin count is not a multiple of two.';
}
if (in_array($pinout->type, [Pinout::TYPE_QFN, Pinout::TYPE_QFP]) && count($pinout->pins) % 4 != 0) {
$failures[] = 'QFP/QFN pinout (' . $pinout->name . ') pin count is not a multiple of four.';
}
} }
return $failures; return $failures;