From 0619263295d72e28d69090a6fc6194961a5a299b Mon Sep 17 00:00:00 2001 From: Nav Date: Fri, 12 Jul 2024 15:09:05 +0100 Subject: [PATCH] Added config value to `TargetPhysicalInterface` enum --- build/scripts/Targets/TargetPhysicalInterface.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/build/scripts/Targets/TargetPhysicalInterface.php b/build/scripts/Targets/TargetPhysicalInterface.php index 7048eea7..3c88b17c 100644 --- a/build/scripts/Targets/TargetPhysicalInterface.php +++ b/build/scripts/Targets/TargetPhysicalInterface.php @@ -16,7 +16,7 @@ enum TargetPhysicalInterface: string public function marketingName(): string { - return match($this) { + return match ($this) { self::ISP => 'ISP', self::JTAG => 'JTAG', self::PDI => 'PDI', @@ -24,4 +24,15 @@ enum TargetPhysicalInterface: string self::DEBUG_WIRE => 'debugWIRE', }; } + + public function configValue(): ?string + { + return match ($this) { + self::JTAG => 'jtag', + self::PDI => 'pdi', + self::UPDI => 'updi', + self::DEBUG_WIRE => 'debug-wire', + default => null + }; + } }