Deleted redundant AVR8 ProgrammingSession struct

This commit is contained in:
Nav
2022-12-11 23:27:08 +00:00
parent 76a0207701
commit 08bc12a26b
3 changed files with 4 additions and 16 deletions

View File

@@ -592,16 +592,16 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
void Avr8::enableProgrammingMode() {
this->avr8DebugInterface->enableProgrammingMode();
this->programmingSession = ProgrammingSession();
this->progModeEnabled = true;
}
void Avr8::disableProgrammingMode() {
this->avr8DebugInterface->disableProgrammingMode();
this->programmingSession = std::nullopt;
this->progModeEnabled = false;
}
bool Avr8::programmingModeEnabled() {
return this->programmingSession.has_value();
return this->progModeEnabled;
}
void Avr8::initFromTargetDescriptionFile() {

View File

@@ -14,7 +14,6 @@
#include "Family.hpp"
#include "TargetParameters.hpp"
#include "PadDescriptor.hpp"
#include "ProgrammingSession.hpp"
#include "ProgramMemorySection.hpp"
#include "src/Targets/TargetRegister.hpp"
@@ -152,7 +151,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
std::map<TargetRegisterType, TargetRegisterDescriptors> targetRegisterDescriptorsByType;
std::map<TargetMemoryType, TargetMemoryDescriptor> targetMemoryDescriptorsByType;
std::optional<ProgrammingSession> programmingSession;
bool progModeEnabled = false;
/**
* Initiates the AVR8 instance from data extracted from the TDF.

View File

@@ -1,11 +0,0 @@
#pragma once
namespace Bloom::Targets::Microchip::Avr::Avr8Bit
{
struct ProgrammingSession
{
bool chipErased = false;
bool applicationSectionErased = false;
bool bootSectionErased = false;
};
}