Target driver passthrough commands

Added `pm` commands to manage the program mode of WCH targets
This commit is contained in:
Nav
2024-12-15 17:32:58 +00:00
parent 1392cda74f
commit 40859201e4
16 changed files with 243 additions and 3 deletions

View File

@@ -17,5 +17,6 @@ namespace TargetController::Responses
TARGET_STACK_POINTER,
TARGET_PROGRAM_COUNTER,
PROGRAM_BREAKPOINT,
TARGET_PASSTHROUGH_RESPONSE,
};
}

View File

@@ -0,0 +1,26 @@
#pragma once
#include <optional>
#include "Response.hpp"
#include "src/Targets/PassthroughResponse.hpp"
namespace TargetController::Responses
{
class TargetPassthroughResponse: public Response
{
public:
static constexpr ResponseType type = ResponseType::TARGET_PASSTHROUGH_RESPONSE;
std::optional<Targets::PassthroughResponse> response;
explicit TargetPassthroughResponse(std::optional<Targets::PassthroughResponse>&& response)
: response(std::move(response))
{}
[[nodiscard]] ResponseType getType() const override {
return TargetPassthroughResponse::type;
}
};
}