Refactored physical interfaces in TDFs and TDF scripts
This commit is contained in:
27
build/scripts/Targets/TargetPhysicalInterface.php
Normal file
27
build/scripts/Targets/TargetPhysicalInterface.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace Targets;
|
||||
|
||||
enum TargetPhysicalInterface: string
|
||||
{
|
||||
case ISP = 'isp';
|
||||
case JTAG = 'jtag';
|
||||
case PDI = 'pdi';
|
||||
case UPDI = 'updi';
|
||||
case DEBUG_WIRE = 'debug_wire';
|
||||
|
||||
public function supportsDebugging(): bool
|
||||
{
|
||||
return $this !== self::ISP;
|
||||
}
|
||||
|
||||
public function marketingName(): string
|
||||
{
|
||||
return match($this) {
|
||||
self::ISP => 'ISP',
|
||||
self::JTAG => 'JTAG',
|
||||
self::PDI => 'PDI',
|
||||
self::UPDI => 'UPDI',
|
||||
self::DEBUG_WIRE => 'debugWIRE',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user