Added additional TDF validation for pinouts and pin counts

This commit is contained in:
Nav
2021-06-09 22:50:32 +01:00
parent be1e978bb6
commit b119ee8c4b
4 changed files with 122 additions and 7 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace Bloom\BuildScripts\TargetDescriptionFiles;
require_once __DIR__ . "/Pin.php";
class Pinout
{
const TYPE_SOIC = 'SOIC';
const TYPE_DIP = 'DIP';
const TYPE_QFN = 'QFN';
const TYPE_BGA = 'BGA';
public ?string $name = null;
public ?string $function = null;
public ?string $type = null;
/**
* The name of the pinouts typically include the number of pins. We extract this if we can, so that we can
* validate against it.
*
* For example, for an SOIC pinout with 20 pins, the name of the pinout would be something like "SOIC20"
* or "SOIC_20".
*
* @var int|null
*/
public ?int $expectedPinCount = null;
/** @var Pin[] */
public array $pins = [];
}