Added EraseTargetMemory TC command
This commit is contained in:
@@ -18,6 +18,7 @@ namespace Bloom::TargetController::Commands
|
||||
WRITE_TARGET_REGISTERS,
|
||||
READ_TARGET_MEMORY,
|
||||
WRITE_TARGET_MEMORY,
|
||||
ERASE_TARGET_MEMORY,
|
||||
GET_TARGET_STATE,
|
||||
STEP_TARGET_EXECUTION,
|
||||
SET_BREAKPOINT,
|
||||
|
||||
33
src/TargetController/Commands/EraseTargetMemory.hpp
Normal file
33
src/TargetController/Commands/EraseTargetMemory.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "Command.hpp"
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace Bloom::TargetController::Commands
|
||||
{
|
||||
class EraseTargetMemory: public Command
|
||||
{
|
||||
public:
|
||||
static constexpr CommandType type = CommandType::ERASE_TARGET_MEMORY;
|
||||
static const inline std::string name = "EraseTargetMemory";
|
||||
|
||||
Targets::TargetMemoryType memoryType;
|
||||
|
||||
EraseTargetMemory(Targets::TargetMemoryType memoryType)
|
||||
: memoryType(memoryType)
|
||||
{};
|
||||
|
||||
[[nodiscard]] CommandType getType() const override {
|
||||
return EraseTargetMemory::type;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool requiresStoppedTargetState() const override {
|
||||
return true;
|
||||
}
|
||||
|
||||
[[nodiscard]] bool requiresDebugMode() const override {
|
||||
return this->memoryType == Targets::TargetMemoryType::RAM;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user