Initial commit

This commit is contained in:
Nav
2021-04-04 21:04:12 +01:00
commit a29c5e1fec
549 changed files with 441216 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
#pragma once
#include <string>
#include <cstdint>
#include <vector>
#include <optional>
#include <map>
namespace Bloom::Targets
{
enum class TargetPinType: int {
UNKNOWN,
GPIO,
GND,
VCC,
};
struct TargetPinDescriptor
{
int number;
bool supportsGpio = false;
std::string name;
std::string padName;
std::vector<std::string> functions;
TargetPinType type = TargetPinType::UNKNOWN;
};
struct TargetPinState
{
enum class IoState: int {
HIGH,
LOW,
};
enum class IoDirection: int {
INPUT,
OUTPUT,
};
std::optional<IoState> ioState;
std::optional<IoDirection> ioDirection;
};
using TargetPinStateMappingType = std::map<int, Bloom::Targets::TargetPinState>;
}
Q_DECLARE_METATYPE(Bloom::Targets::TargetPinDescriptor)
Q_DECLARE_METATYPE(Bloom::Targets::TargetPinState)
Q_DECLARE_METATYPE(Bloom::Targets::TargetPinStateMappingType)