Added programmingModeEnabled flag to EdbgAvr8Interface

This commit is contained in:
Nav
2022-05-17 19:45:56 +01:00
parent 0808303311
commit aefe3dd7e8
2 changed files with 7 additions and 0 deletions

View File

@@ -686,6 +686,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
if (response.getResponseId() == Avr8ResponseId::FAILED) { if (response.getResponseId() == Avr8ResponseId::FAILED) {
throw Avr8CommandFailure("Failed to enter programming mode on EDBG debug tool", response); throw Avr8CommandFailure("Failed to enter programming mode on EDBG debug tool", response);
} }
this->programmingModeEnabled = true;
} }
void EdbgAvr8Interface::disableProgrammingMode() { void EdbgAvr8Interface::disableProgrammingMode() {
@@ -697,6 +699,9 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
throw Avr8CommandFailure("Failed to leave programming mode on EDBG debug tool", response); throw Avr8CommandFailure("Failed to leave programming mode on EDBG debug tool", response);
} }
this->programmingModeEnabled = false;
}
std::map<Family, std::map<PhysicalInterface, Avr8ConfigVariant>> std::map<Family, std::map<PhysicalInterface, Avr8ConfigVariant>>
EdbgAvr8Interface::getConfigVariantsByFamilyAndPhysicalInterface() { EdbgAvr8Interface::getConfigVariantsByFamilyAndPhysicalInterface() {
return std::map<Family, std::map<PhysicalInterface, Avr8ConfigVariant>>({ return std::map<Family, std::map<PhysicalInterface, Avr8ConfigVariant>>({

View File

@@ -336,6 +336,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
*/ */
bool targetAttached = false; bool targetAttached = false;
bool programmingModeEnabled = false;
/** /**
* This mapping allows us to determine which config variant to select, based on the target family and the * This mapping allows us to determine which config variant to select, based on the target family and the
* selected physical interface. * selected physical interface.