Updated TDF pinout and pin extraction to align with new TDF format

This commit is contained in:
Nav
2024-03-09 01:49:04 +00:00
parent 024058db53
commit e5cac7e39c
5 changed files with 117 additions and 110 deletions

View File

@@ -1,19 +1,35 @@
#pragma once
#include <string>
#include <cstdint>
#include <optional>
#include <vector>
#include "Pin.hpp"
#include "src/Targets/TargetPinoutDescriptor.hpp"
namespace Targets::TargetDescription
{
struct Pin
{
std::string pad;
int position;
};
struct Pinout
{
std::string key;
std::string name;
::Targets::PinoutType type;
std::optional<std::string> function;
std::vector<Pin> pins;
Pinout(
const std::string& key,
const std::string& name,
::Targets::PinoutType type,
const std::optional<std::string>& function,
const std::vector<Pin>& pins
)
: key(key)
, name(name)
, type(type)
, function(function)
, pins(pins)
{}
};
}