diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.cpp index 54f5e17b..517bfdce 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.cpp @@ -3,8 +3,6 @@ #include #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp" -#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp" -#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp" namespace Bloom::DebugToolDrivers::Protocols::CmsisDap { @@ -25,28 +23,4 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap this->getUsbHidInterface().write(static_cast>(cmsisDapCommand)); } - - std::unique_ptr CmsisDapInterface::getResponse() { - auto rawResponse = this->getUsbHidInterface().read(10000); - - if (rawResponse.empty()) { - throw DeviceCommunicationFailure("Empty CMSIS-DAP response received"); - } - - auto response = std::make_unique(Response()); - response->init(rawResponse); - return response; - } - - std::unique_ptr CmsisDapInterface::sendCommandAndWaitForResponse(const Command& cmsisDapCommand) { - this->sendCommand(cmsisDapCommand); - auto response = this->getResponse(); - - if (response->getResponseId() != cmsisDapCommand.getCommandId()) { - // This response is not what we were expecting - throw DeviceCommunicationFailure("Unexpected response to CMSIS-DAP command."); - } - - return response; - } } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp index b3a8da53..5dcd0ca9 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp @@ -2,12 +2,15 @@ #include #include +#include #include "src/DebugToolDrivers/USB/HID/HidInterface.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp" +#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp" + namespace Bloom::DebugToolDrivers::Protocols::CmsisDap { /** @@ -31,7 +34,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap return this->usbHidInterface; } - size_t getUsbHidInputReportSize() { + std::size_t getUsbHidInputReportSize() { return this->usbHidInterface.getInputReportSize(); } @@ -44,7 +47,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap * * @param cmsisDapCommand */ - virtual void sendCommand(const Protocols::CmsisDap::Command& cmsisDapCommand); + virtual void sendCommand(const Command& cmsisDapCommand); /** * Listens for a CMSIS-DAP response from the device. @@ -52,9 +55,24 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap * @TODO: There is a hard-coded timeout in this method. Review. * * @return - * The parsed response. + * An instance to ResponseType, which must be derived from the Response class. The instance is constructed via + * its raw buffer constructor: ResponseType(const std::vector&). */ - virtual std::unique_ptr getResponse(); + template + auto getResponse() { + static_assert( + std::is_base_of::value, + "CMSIS Response type must be derived from the Response class." + ); + + const auto rawResponse = this->getUsbHidInterface().read(10000); + + if (rawResponse.empty()) { + throw Exceptions::DeviceCommunicationFailure("Empty CMSIS-DAP response received"); + } + + return ResponseType(rawResponse); + } /** * Sends a CMSIS-DAP command and waits for a response. @@ -62,11 +80,30 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap * @param cmsisDapCommand * * @return - * The parsed response. + * An instance of the ExpectedResponseType alias defined in CommandType. + * See the CmsisDapInterface::getResponse() template function for more. */ - virtual std::unique_ptr sendCommandAndWaitForResponse( - const Protocols::CmsisDap::Command& cmsisDapCommand - ); + template + auto sendCommandAndWaitForResponse(const CommandType& cmsisDapCommand) { + static_assert( + std::is_base_of::value, + "CMSIS Command type must be derived from the Command class." + ); + + static_assert( + std::is_base_of::value, + "CMSIS Command type must specify a valid expected response type, derived from the Response class." + ); + + this->sendCommand(cmsisDapCommand); + auto response = this->getResponse(); + + if (response.getResponseId() != cmsisDapCommand.getCommandId()) { + throw Exceptions::DeviceCommunicationFailure("Unexpected response to CMSIS-DAP command."); + } + + return response; + } private: /** diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp index 4119732e..82f815e4 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp @@ -3,11 +3,52 @@ #include #include +#include "Response.hpp" + namespace Bloom::DebugToolDrivers::Protocols::CmsisDap { + /** + * CMSIS-DAP command. + * + * Casting an instance of this class to an std::vector will result in the raw buffer of the + * CMSIS-DAP command, which can then be sent to the device. See the conversion function below. + */ class Command { public: + /* + * CMSIS-DAP commands always result in a response. The data structure and contents of the response depends on + * the command. Because of this, we allow the command class (and any derived classes) to specify the expected + * response type, via the ExpectedResponseType alias. + * + * This alias is used by template functions such as CmsisDapInterface::sendCommandAndWaitForResponse(), to + * determine which type to use, when constructing and returning a response object. This means we don't have + * to perform any downcasting with our response objects, and the type of our response objects is known at + * compile time. + * + * For example, consider the AvrResponseCommand - this is a CMSIS-DAP vendor command which requests an AVR + * response from the device. Upon issuing this command, we expect the device to respond with data in the + * structure described by the AvrResponse class. So, in the AvrResponseCommand class, we set the + * ExpectedResponseType alias to AvrResponse. Then, when sending an AvrResponseCommand to the device: + * + * CmsisDapInterface cmsisInterface; + * AvrResponseCommand avrResponseCommand; + * auto response = cmsisInterface.sendCommandAndWaitForResponse(avrResponseCommand); + * + * In the code above, the response object will be an instance of the AvrResponse class, because the + * CmsisDapInterface::sendCommandAndWaitForResponse() function will use the ExpectedResponseType alias from + * the command class (AvrResponseCommand::ExpectedResponseType). + * + * Effectively, the ExpectedResponseType alias allows us to map CMSIS-DAP command classes to response classes. + * This mapping is employed by the necessary functions to provide us with response objects of the correct type, + * improving type safety and type hinting. + * + * For more on this, see the implementation of the following template functions: + * CmsisDapInterface::sendCommandAndWaitForResponse() + * CmsisDapInterface::getResponse() + */ + using ExpectedResponseType = Response; + Command() = default; virtual ~Command() = default; diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.cpp index b5b90412..8f5f73b2 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.cpp @@ -4,7 +4,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap { - void Response::init(const std::vector& rawResponse) { + Response::Response(const std::vector& rawResponse) { if (rawResponse.empty()) { throw Exceptions::Exception("Failed to process CMSIS-DAP response - invalid response"); } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp index a3f74ffd..f0a52817 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp @@ -7,7 +7,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap class Response { public: - Response() = default; + Response(const std::vector& rawResponse); virtual ~Response() = default; Response(const Response& other) = default; @@ -16,8 +16,6 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap Response& operator = (const Response& other) = default; Response& operator = (Response&& other) = default; - virtual void init(const std::vector& rawResponse); - [[nodiscard]] unsigned char getResponseId() const { return this->responseId; } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp index 1d818477..2e20b8e6 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp @@ -5,11 +5,29 @@ #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp" +#include "AvrResponse.hpp" + namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr { + /** + * AVR CMSIS-DAP vendor command. + */ class AvrCommand: public Command { public: + /* + * AVR CMSIS-DAP vendor commands *do not* directly result in an AvrResponse object. The device will respond + * immediately upon receiving this command, simply acknowledging receipt of the command. + * + * If a response is expected to follow upon the execution of the AVR command, it must be requested from the + * device, using the AvrResponseCommand (see that class declaration for more info). + * + * For this reason, the ExpectedResponseType for this command is just the standard Response type. + * + * For more on the purpose of this alias, see the Command class. + */ + using ExpectedResponseType = Response; + AvrCommand( std::size_t fragmentCount, std::size_t fragmentNumber, diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp index bc70e8fc..7436a1ba 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp @@ -6,9 +6,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr { using namespace Bloom::Exceptions; - void AvrEvent::init(const std::vector& rawResponse) { - Response::init(rawResponse); - + AvrEvent::AvrEvent(const std::vector& rawResponse): Response(rawResponse) { if (this->getResponseId() != 0x82) { throw Exception("Failed to construct AvrEvent object - invalid response ID."); } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.hpp index 016954e4..3fea4331 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.hpp @@ -23,20 +23,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr class AvrEvent: public Response { public: - AvrEvent() = default; - - /** - * Construct an AVRResponse object from a Response object. - * - * @param response - */ - void init(const Response& response) { - auto rawData = response.getData(); - rawData.insert(rawData.begin(), response.getResponseId()); - this->init(rawData); - } - - void init(const std::vector& rawResponse) override; + explicit AvrEvent(const std::vector& rawResponse); [[nodiscard]] const std::vector& getEventData() const { return this->eventData; diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEventCommand.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEventCommand.hpp index 54bbeb9a..ac8b45b7 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEventCommand.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEventCommand.hpp @@ -1,14 +1,15 @@ #pragma once -#include - #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp" +#include "AvrEvent.hpp" -namespace Bloom::DebugToolDrivers::Protocols::CmsisDap +namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr { class AvrEventCommand: public Command { public: + using ExpectedResponseType = AvrEvent; + AvrEventCommand() { this->setCommandId(0x82); } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.cpp index ba076932..0a72f176 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.cpp @@ -6,9 +6,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr { using namespace Bloom::Exceptions; - void AvrResponse::init(const std::vector& rawResponse) { - Response::init(rawResponse); - + AvrResponse::AvrResponse(const std::vector& rawResponse): Response(rawResponse) { if (this->getResponseId() != 0x81) { throw Exception("Failed to construct AvrResponse object - invalid response ID."); } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.hpp index 935b9da5..500b32c0 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.hpp @@ -10,20 +10,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr class AvrResponse: public Response { public: - AvrResponse() = default; - - /** - * Construct an AVRResponse object from a Response object. - * - * @param response - */ - void init(const Response& response) { - auto rawData = response.getData(); - rawData.insert(rawData.begin(), response.getResponseId()); - this->init(rawData); - } - - void init(const std::vector& rawResponse) override; + explicit AvrResponse(const std::vector& rawResponse); [[nodiscard]] std::uint8_t getFragmentNumber() const { return this->fragmentNumber; diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponseCommand.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponseCommand.hpp index 21f44217..54483d74 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponseCommand.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponseCommand.hpp @@ -4,6 +4,8 @@ #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp" +#include "AvrResponse.hpp" + namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr { /** @@ -12,8 +14,9 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr * * Responses to AVR commands are not automatically sent from the device, they must be requested from the device. * - * An AvrResponseCommand is a CMSIS-DAP command, used to request a response for an AVR command. In response to an - * AvrResponseCommand, the device will send over an AVRResponse, which will contain the response to the AVR command. + * An AvrResponseCommand is a CMSIS-DAP vendor command, used to request a response for an AVR command. In response + * to an AvrResponseCommand, the device will send over an AvrResponse, which will contain the response to the + * AVR command. * * For more information on this, see the 'Embedded Debugger-Based Tools Protocols User's Guide' * document, by Microchip. Link provided in the AtmelICE device class declaration. @@ -23,6 +26,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr class AvrResponseCommand: public Command { public: + using ExpectedResponseType = AvrResponse; + AvrResponseCommand() { this->setCommandId(0x81); } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.cpp index e7464ccd..a3de3169 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.cpp @@ -8,8 +8,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr using Bloom::Targets::TargetBreakCause; - void BreakEvent::init(const AvrEvent& event) { - AvrEvent::init(event); + BreakEvent::BreakEvent(const AvrEvent& event): AvrEvent(event) { const auto& data = this->getEventData(); if (data.size() < 8) { diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.hpp index a2ca811b..31880e95 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.hpp @@ -10,9 +10,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr class BreakEvent: public AvrEvent { public: - explicit BreakEvent(const AvrEvent& event) { - this->init(event); - } + explicit BreakEvent(const AvrEvent& event); [[nodiscard]] std::uint32_t getProgramCounter() const { return this->programCounter; diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.cpp index b99b0cfd..bdee7b2e 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.cpp @@ -16,7 +16,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg auto response = this->sendCommandAndWaitForResponse(avrCommand); if (&avrCommand == &avrCommands.back()) { - return *response; + return response; } } @@ -26,31 +26,14 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg ); } - Protocols::CmsisDap::Edbg::Avr::AvrResponse EdbgInterface::getAvrResponse() { - auto cmsisResponse = this->getResponse(); - - if (cmsisResponse->getResponseId() == 0x81) { - // This is an AVR_RSP response - auto avrResponse = Protocols::CmsisDap::Edbg::Avr::AvrResponse(); - avrResponse.init(*cmsisResponse); - return avrResponse; - } - - throw DeviceCommunicationFailure("Unexpected response to AvrResponseCommand from device"); - } - std::optional EdbgInterface::requestAvrEvent() { - this->sendCommand(AvrEventCommand()); - auto cmsisResponse = this->getResponse(); + auto avrEventResponse = this->sendCommandAndWaitForResponse(Avr::AvrEventCommand()); - if (cmsisResponse->getResponseId() == 0x82) { - // This is an AVR_EVT response - auto avrEvent = Protocols::CmsisDap::Edbg::Avr::AvrEvent(); - avrEvent.init(*cmsisResponse); - return avrEvent.getEventDataSize() > 0 ? std::optional(avrEvent) : std::nullopt; + if (avrEventResponse.getResponseId() != 0x82) { + throw DeviceCommunicationFailure("Unexpected response to AvrEventCommand from device"); } - throw DeviceCommunicationFailure("Unexpected response to AvrEventCommand from device"); + return avrEventResponse.getEventDataSize() > 0 ? std::optional(avrEventResponse) : std::nullopt; } std::vector EdbgInterface::requestAvrResponses() { @@ -59,34 +42,32 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg std::vector responses; AvrResponseCommand responseCommand; - this->sendCommand(responseCommand); - auto response = this->getAvrResponse(); - responses.push_back(response); - int fragmentCount = response.getFragmentCount(); + auto avrResponse = this->sendCommandAndWaitForResponse(responseCommand); + responses.push_back(avrResponse); + const auto fragmentCount = avrResponse.getFragmentCount(); while (responses.size() < fragmentCount) { // There are more response packets - this->sendCommand(responseCommand); - response = this->getAvrResponse(); + auto avrResponse = this->sendCommandAndWaitForResponse(responseCommand); - if (response.getFragmentCount() != fragmentCount) { + if (avrResponse.getFragmentCount() != fragmentCount) { throw DeviceCommunicationFailure( "Failed to fetch AVRResponse objects - invalid fragment count returned." ); } - if (response.getFragmentCount() == 0 && response.getFragmentNumber() == 0) { + if (avrResponse.getFragmentCount() == 0 && avrResponse.getFragmentNumber() == 0) { throw DeviceCommunicationFailure( "Failed to fetch AVRResponse objects - unexpected empty response" ); } - if (response.getFragmentNumber() == 0) { + if (avrResponse.getFragmentNumber() == 0) { // End of response data ( &this packet can be ignored) break; } - responses.push_back(response); + responses.push_back(avrResponse); } return responses; diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp index 0bd5bdaa..82006b77 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp @@ -4,6 +4,7 @@ #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp" +#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEventCommand.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp" @@ -48,8 +49,6 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg const std::vector& avrCommands ); - Protocols::CmsisDap::Edbg::Avr::AvrResponse getAvrResponse(); - template typename CommandFrameType::ResponseFrameType sendAvrCommandFrameAndWaitForResponseFrame( const CommandFrameType& avrCommandFrame