Replaced RetrieveStackPointerFromTarget event with TC command

This commit is contained in:
Nav
2022-05-01 18:01:01 +01:00
parent 75d8ca68fb
commit d8af8fe1ee
11 changed files with 72 additions and 87 deletions

View File

@@ -22,5 +22,6 @@ namespace Bloom::TargetController::Commands
SET_PROGRAM_COUNTER,
GET_TARGET_PIN_STATES,
SET_TARGET_PIN_STATE,
GET_TARGET_STACK_POINTER,
};
}

View File

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