Added AVR8 programming session struct
This commit is contained in:
@@ -575,16 +575,16 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
||||
|
||||
void Avr8::enableProgrammingMode() {
|
||||
this->avr8DebugInterface->enableProgrammingMode();
|
||||
this->programmingModeActive = true;
|
||||
this->programmingSession = ProgrammingSession();
|
||||
}
|
||||
|
||||
void Avr8::disableProgrammingMode() {
|
||||
this->avr8DebugInterface->disableProgrammingMode();
|
||||
this->programmingModeActive = false;
|
||||
this->programmingSession = std::nullopt;
|
||||
}
|
||||
|
||||
bool Avr8::programmingModeEnabled() {
|
||||
return this->programmingModeActive;
|
||||
return this->programmingSession.has_value();
|
||||
}
|
||||
|
||||
void Avr8::loadTargetDescriptionFile() {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "Family.hpp"
|
||||
#include "TargetParameters.hpp"
|
||||
#include "PadDescriptor.hpp"
|
||||
#include "ProgrammingSession.hpp"
|
||||
#include "src/Targets/TargetRegister.hpp"
|
||||
|
||||
#include "TargetDescription/TargetDescriptionFile.hpp"
|
||||
@@ -145,7 +146,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
||||
std::map<TargetRegisterType, TargetRegisterDescriptors> targetRegisterDescriptorsByType;
|
||||
std::map<TargetMemoryType, TargetMemoryDescriptor> targetMemoryDescriptorsByType;
|
||||
|
||||
bool programmingModeActive = false;
|
||||
std::optional<ProgrammingSession> programmingSession;
|
||||
|
||||
/**
|
||||
* Resolves the appropriate TDF for the AVR8 target and populates this->targetDescriptionFile.
|
||||
|
||||
10
src/Targets/Microchip/AVR/AVR8/ProgrammingSession.hpp
Normal file
10
src/Targets/Microchip/AVR/AVR8/ProgrammingSession.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
||||
{
|
||||
struct ProgrammingSession
|
||||
{
|
||||
bool applicationSectionErased = false;
|
||||
bool bootSectionErased = false;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user