Implemented programming mode functions for Avr8 target class

This commit is contained in:
Nav
2022-05-15 17:42:02 +01:00
parent cea43044e5
commit 89c47db1c0
2 changed files with 22 additions and 0 deletions

View File

@@ -573,6 +573,20 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
} }
} }
void Avr8::enableProgrammingMode() {
this->avr8DebugInterface->enableProgrammingMode();
this->programmingModeActive = true;
}
void Avr8::disableProgrammingMode() {
this->avr8DebugInterface->disableProgrammingMode();
this->programmingModeActive = false;
}
bool Avr8::programmingModeEnabled() {
return this->programmingModeActive;
}
void Avr8::loadTargetDescriptionFile() { void Avr8::loadTargetDescriptionFile() {
this->targetDescriptionFile = TargetDescription::TargetDescriptionFile( this->targetDescriptionFile = TargetDescription::TargetDescriptionFile(
this->getId(), this->getId(),

View File

@@ -122,6 +122,12 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
const TargetPinState& state const TargetPinState& state
) override; ) override;
void enableProgrammingMode() override;
void disableProgrammingMode() override;
bool programmingModeEnabled() override;
protected: protected:
DebugToolDrivers::TargetInterfaces::TargetPowerManagementInterface* targetPowerManagementInterface = nullptr; DebugToolDrivers::TargetInterfaces::TargetPowerManagementInterface* targetPowerManagementInterface = nullptr;
DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* avr8DebugInterface = nullptr; DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* avr8DebugInterface = nullptr;
@@ -139,6 +145,8 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
std::map<TargetRegisterType, TargetRegisterDescriptors> targetRegisterDescriptorsByType; std::map<TargetRegisterType, TargetRegisterDescriptors> targetRegisterDescriptorsByType;
std::map<TargetMemoryType, TargetMemoryDescriptor> targetMemoryDescriptorsByType; std::map<TargetMemoryType, TargetMemoryDescriptor> targetMemoryDescriptorsByType;
bool programmingModeActive = false;
/** /**
* Resolves the appropriate TDF for the AVR8 target and populates this->targetDescriptionFile. * Resolves the appropriate TDF for the AVR8 target and populates this->targetDescriptionFile.
*/ */