Renaming AVR8 dir/namespace in TDF validation scripts

This commit is contained in:
Nav
2024-12-28 01:33:36 +00:00
parent b214f76a32
commit ca7eea9746
17 changed files with 9 additions and 9 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace Targets\TargetDescriptionFiles\Avr8;
class Signature
{
public ?int $byteZero = null;
public ?int $byteOne = null;
public ?int $byteTwo = null;
public function toHex(): string
{
if ($this->byteZero === null || $this->byteOne === null || $this->byteTwo === null) {
throw new \Exception("Cannot generate hex string of incomplete AVR8 target signature.");
}
return '0x' . strtoupper(
substr('0' . dechex($this->byteZero), -2)
. substr('0' . dechex($this->byteOne), -2)
. substr('0' . dechex($this->byteTwo), -2)
);
}
}