Introduced concept of programming mode

This commit is contained in:
Nav
2022-06-05 16:13:43 +01:00
parent accea6a08c
commit cfe533e5db
11 changed files with 172 additions and 0 deletions

View File

@@ -37,6 +37,8 @@
#include "Commands/SetTargetPinState.hpp"
#include "Commands/GetTargetStackPointer.hpp"
#include "Commands/GetTargetProgramCounter.hpp"
#include "Commands/EnableProgrammingMode.hpp"
#include "Commands/DisableProgrammingMode.hpp"
// Responses
#include "Responses/Response.hpp"
@@ -292,6 +294,17 @@ namespace Bloom::TargetController
*/
void resetTarget();
/**
* Puts the target into programming mode and disables command handlers for debug commands (commands that serve
* debug operations such as SetBreakpoint, ResumeTargetExecution, etc).
*/
void enableProgrammingMode();
/**
* Pulls the target out of programming mode and enables command handlers for debug commands.
*/
void disableProgrammingMode();
/**
* Returns a cached instance of the target's TargetDescriptor.
*
@@ -344,5 +357,7 @@ namespace Bloom::TargetController
std::unique_ptr<Responses::TargetProgramCounter> handleGetTargetProgramCounter(
Commands::GetTargetProgramCounter& command
);
std::unique_ptr<Responses::Response> handleEnableProgrammingMode(Commands::EnableProgrammingMode& command);
std::unique_ptr<Responses::Response> handleDisableProgrammingMode(Commands::DisableProgrammingMode& command);
};
}