Files
BloomPatched/src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.cpp
Nav 6cdbfbe950 Massive refactor to accommodate RISC-V targets
- Refactored entire codebase (excluding the Insight component) to accommodate multiple target architectures (no longer specific to AVR)
- Deleted 'generate SVD' GDB monitor command - I will eventually move this functionality to the Bloom website
- Added unit size property to address spaces
- Many other changes which I couldn't be bothered to describe here
2024-07-23 21:14:22 +01:00

16 lines
470 B
C++

#include "Response.hpp"
#include "src/Exceptions/Exception.hpp"
namespace DebugToolDrivers::Protocols::CmsisDap
{
Response::Response(const std::vector<unsigned char>& rawResponse) {
if (rawResponse.empty()) {
throw Exceptions::Exception{"Failed to process CMSIS-DAP response - invalid response"};
}
this->id = rawResponse[0];
this->data = std::vector<unsigned char>{rawResponse.begin() + 1, rawResponse.end()};
}
}