More tidying
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Bloom::TargetController::Commands
|
||||
{
|
||||
GENERIC,
|
||||
GET_TARGET_CONTROLLER_STATE,
|
||||
GET_TARGET_DESCRIPTOR,
|
||||
STOP_TARGET_EXECUTION,
|
||||
RESUME_TARGET_EXECUTION,
|
||||
RESET_TARGET,
|
||||
@@ -24,6 +25,5 @@ namespace Bloom::TargetController::Commands
|
||||
SET_TARGET_PIN_STATE,
|
||||
GET_TARGET_STACK_POINTER,
|
||||
GET_TARGET_PROGRAM_COUNTER,
|
||||
GET_TARGET_DESCRIPTOR,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,12 +8,12 @@ namespace Bloom::TargetController::Responses
|
||||
{
|
||||
GENERIC,
|
||||
ERROR,
|
||||
TARGET_DESCRIPTOR,
|
||||
TARGET_REGISTERS_READ,
|
||||
TARGET_MEMORY_READ,
|
||||
TARGET_STATE,
|
||||
TARGET_PIN_STATES,
|
||||
TARGET_STACK_POINTER,
|
||||
TARGET_PROGRAM_COUNTER,
|
||||
TARGET_DESCRIPTOR,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,13 +21,8 @@
|
||||
#include "Commands/GetTargetStackPointer.hpp"
|
||||
#include "Commands/GetTargetProgramCounter.hpp"
|
||||
|
||||
#include "src/Logger/Logger.hpp"
|
||||
|
||||
namespace Bloom::TargetController
|
||||
{
|
||||
using namespace Bloom::Targets;
|
||||
using namespace Bloom::Exceptions;
|
||||
|
||||
using Commands::GetTargetDescriptor;
|
||||
using Commands::GetTargetState;
|
||||
using Commands::StopTargetExecution;
|
||||
@@ -46,6 +41,22 @@ namespace Bloom::TargetController
|
||||
using Commands::GetTargetStackPointer;
|
||||
using Commands::GetTargetProgramCounter;
|
||||
|
||||
using Targets::TargetDescriptor;
|
||||
using Targets::TargetState;
|
||||
|
||||
using Targets::TargetRegisters;
|
||||
using Targets::TargetRegisterDescriptors;
|
||||
|
||||
using Targets::TargetMemoryType;
|
||||
using Targets::TargetMemoryAddressRange;
|
||||
using Targets::TargetMemoryBuffer;
|
||||
|
||||
using Targets::TargetBreakpoint;
|
||||
|
||||
using Targets::TargetPinDescriptor;
|
||||
using Targets::TargetPinState;
|
||||
using Targets::TargetPinStateMappingType;
|
||||
|
||||
TargetControllerState TargetControllerConsole::getTargetControllerState() {
|
||||
return TargetControllerComponent::getState();
|
||||
}
|
||||
@@ -59,14 +70,14 @@ namespace Bloom::TargetController
|
||||
}
|
||||
}
|
||||
|
||||
Targets::TargetDescriptor TargetControllerConsole::getTargetDescriptor() {
|
||||
TargetDescriptor TargetControllerConsole::getTargetDescriptor() {
|
||||
return this->commandManager.sendCommandAndWaitForResponse(
|
||||
std::make_unique<GetTargetDescriptor>(),
|
||||
this->defaultTimeout
|
||||
)->targetDescriptor;
|
||||
}
|
||||
|
||||
Targets::TargetState TargetControllerConsole::getTargetState() {
|
||||
TargetState TargetControllerConsole::getTargetState() {
|
||||
return this->commandManager.sendCommandAndWaitForResponse(
|
||||
std::make_unique<GetTargetState>(),
|
||||
this->defaultTimeout
|
||||
@@ -124,7 +135,7 @@ namespace Bloom::TargetController
|
||||
TargetMemoryType memoryType,
|
||||
std::uint32_t startAddress,
|
||||
std::uint32_t bytes,
|
||||
const std::set<Targets::TargetMemoryAddressRange>& excludedAddressRanges
|
||||
const std::set<TargetMemoryAddressRange>& excludedAddressRanges
|
||||
) {
|
||||
return this->commandManager.sendCommandAndWaitForResponse(
|
||||
std::make_unique<ReadTargetMemory>(
|
||||
@@ -176,7 +187,7 @@ namespace Bloom::TargetController
|
||||
);
|
||||
}
|
||||
|
||||
Targets::TargetPinStateMappingType TargetControllerConsole::getPinStates(int variantId) {
|
||||
TargetPinStateMappingType TargetControllerConsole::getPinStates(int variantId) {
|
||||
return this->commandManager.sendCommandAndWaitForResponse(
|
||||
std::make_unique<GetTargetPinStates>(variantId),
|
||||
this->defaultTimeout
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <optional>
|
||||
|
||||
#include "CommandManager.hpp"
|
||||
|
||||
Reference in New Issue
Block a user