New GetTargetProgramCounter TC command

This commit is contained in:
Nav
2022-05-01 18:44:04 +01:00
parent 96cae9d1e4
commit 4209d9eb20
8 changed files with 85 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ namespace Bloom::TargetController::Commands
GET_TARGET_PIN_STATES,
SET_TARGET_PIN_STATE,
GET_TARGET_STACK_POINTER,
GET_TARGET_PROGRAM_COUNTER,
GET_TARGET_DESCRIPTOR,
};
}

View File

@@ -0,0 +1,25 @@
#pragma once
#include "Command.hpp"
#include "src/TargetController/Responses/TargetProgramCounter.hpp"
namespace Bloom::TargetController::Commands
{
class GetTargetProgramCounter: public Command
{
public:
using SuccessResponseType = Responses::TargetProgramCounter;
static constexpr CommandType type = CommandType::GET_TARGET_PROGRAM_COUNTER;
static inline const std::string name = "GetTargetProgramCounter";
[[nodiscard]] CommandType getType() const override {
return GetTargetProgramCounter::type;
}
[[nodiscard]] bool requiresStoppedTargetState() const override {
return true;
}
};
}