Renamed CMSIS commandId field to id
This commit is contained in:
@@ -98,7 +98,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
|
|||||||
this->sendCommand(cmsisDapCommand);
|
this->sendCommand(cmsisDapCommand);
|
||||||
auto response = this->getResponse<typename CommandType::ExpectedResponseType>();
|
auto response = this->getResponse<typename CommandType::ExpectedResponseType>();
|
||||||
|
|
||||||
if (response.id != cmsisDapCommand.commandId) {
|
if (response.id != cmsisDapCommand.id) {
|
||||||
throw Exceptions::DeviceCommunicationFailure("Unexpected response to CMSIS-DAP command.");
|
throw Exceptions::DeviceCommunicationFailure("Unexpected response to CMSIS-DAP command.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
|
namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
|
||||||
{
|
{
|
||||||
Command::Command(unsigned char commandId)
|
Command::Command(unsigned char commandId)
|
||||||
: commandId(commandId)
|
: id(commandId)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Command::operator std::vector<unsigned char>() const {
|
Command::operator std::vector<unsigned char>() const {
|
||||||
auto rawCommand = std::vector<unsigned char>(1, this->commandId);
|
auto rawCommand = std::vector<unsigned char>(1, this->id);
|
||||||
rawCommand.insert(rawCommand.end(), this->data.begin(), this->data.end());
|
rawCommand.insert(rawCommand.end(), this->data.begin(), this->data.end());
|
||||||
|
|
||||||
return rawCommand;
|
return rawCommand;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap
|
|||||||
*/
|
*/
|
||||||
using ExpectedResponseType = Response;
|
using ExpectedResponseType = Response;
|
||||||
|
|
||||||
unsigned char commandId;
|
unsigned char id;
|
||||||
std::vector<unsigned char> data;
|
std::vector<unsigned char> data;
|
||||||
|
|
||||||
explicit Command(unsigned char commandId);
|
explicit Command(unsigned char commandId);
|
||||||
|
|||||||
Reference in New Issue
Block a user