Tidying
This commit is contained in:
@@ -124,21 +124,21 @@ TargetSignature TargetDescriptionFile::getTargetSignature() const {
|
||||
std::optional<unsigned char> signatureByteOne;
|
||||
std::optional<unsigned char> signatureByteTwo;
|
||||
|
||||
if (signatureProperties.find("signature0") != signatureProperties.end()) {
|
||||
if (signatureProperties.contains("signature0")) {
|
||||
signatureByteZero = static_cast<unsigned char>(
|
||||
signatureProperties.find("signature0")->second.value.toShort(nullptr, 16)
|
||||
signatureProperties.at("signature0").value.toShort(nullptr, 16)
|
||||
);
|
||||
}
|
||||
|
||||
if (signatureProperties.find("signature1") != signatureProperties.end()) {
|
||||
if (signatureProperties.contains("signature1")) {
|
||||
signatureByteOne = static_cast<unsigned char>(
|
||||
signatureProperties.find("signature1")->second.value.toShort(nullptr, 16)
|
||||
signatureProperties.at("signature1").value.toShort(nullptr, 16)
|
||||
);
|
||||
}
|
||||
|
||||
if (signatureProperties.find("signature2") != signatureProperties.end()) {
|
||||
if (signatureProperties.contains("signature2")) {
|
||||
signatureByteTwo = static_cast<unsigned char>(
|
||||
signatureProperties.find("signature2")->second.value.toShort(nullptr, 16)
|
||||
signatureProperties.at("signature2").value.toShort(nullptr, 16)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ TargetParameters TargetDescriptionFile::getTargetParameters() const {
|
||||
|
||||
if (supportedPhysicalInterfaces.contains(PhysicalInterface::DEBUG_WIRE)
|
||||
|| supportedPhysicalInterfaces.contains(PhysicalInterface::JTAG)
|
||||
) {
|
||||
) {
|
||||
this->loadDebugWireAndJtagTargetParameters(targetParameters);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "src/Targets/Microchip/AVR/AVR8/TargetParameters.hpp"
|
||||
#include "src/Targets/Microchip/AVR/AVR8/PadDescriptor.hpp"
|
||||
#include "src/Targets/TargetVariant.hpp"
|
||||
#include "src/Targets/TargetRegister.hpp"
|
||||
|
||||
namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription
|
||||
{
|
||||
@@ -184,12 +185,22 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription
|
||||
*/
|
||||
[[nodiscard]] const auto& getSupportedDebugPhysicalInterfaces() const {
|
||||
return this->supportedDebugPhysicalInterfaces;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a mapping of all pad descriptors extracted from TDF, mapped by name.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
[[nodiscard]] const auto& getPadDescriptorsMappedByName() const {
|
||||
return this->padDescriptorsByName;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a mapping of all target variants extracted from the TDF, mapped by ID.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
[[nodiscard]] const auto& getVariantsMappedById() const {
|
||||
return this->targetVariantsById;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user