Refined AVR8 TDF port peripheral module validation

This commit is contained in:
Nav
2021-06-12 01:44:00 +01:00
parent cd79dbbb2c
commit 38fcbe1632

View File

@@ -489,8 +489,12 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
$failures[] = 'PORT peripheral module not found.'; $failures[] = 'PORT peripheral module not found.';
} else { } else {
foreach ($portPeripheralModule->instancesMappedByName as $portInstance) { foreach ($portPeripheralModule->instancesMappedByName as $portName => $portInstance) {
if (empty($portInstance->signals)) { if (
strlen($portName) == 5
&& strpos($portName, "port") === 0
&& empty($portInstance->signals)
) {
$failures[] = 'No signals defined for port ' . $portInstance->name . ' in PORT peripheral module.'; $failures[] = 'No signals defined for port ' . $portInstance->name . ' in PORT peripheral module.';
} }
} }