Tidying
This commit is contained in:
@@ -12,11 +12,11 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
AVR8_BREAK_EVENT = 0x40,
|
||||
};
|
||||
|
||||
inline bool operator==(unsigned char rawId, AvrEventId id) {
|
||||
inline bool operator == (unsigned char rawId, AvrEventId id) {
|
||||
return static_cast<unsigned char>(id) == rawId;
|
||||
}
|
||||
|
||||
inline bool operator==(AvrEventId id, unsigned char rawId) {
|
||||
inline bool operator == (AvrEventId id, unsigned char rawId) {
|
||||
return rawId == id;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,13 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
AvrCommandFrame::lastSequenceId = 0;
|
||||
}
|
||||
};
|
||||
virtual ~AvrCommandFrame() = default;
|
||||
|
||||
AvrCommandFrame(const AvrCommandFrame& other) = default;
|
||||
AvrCommandFrame(AvrCommandFrame&& other) = default;
|
||||
|
||||
AvrCommandFrame& operator = (const AvrCommandFrame& other) = default;
|
||||
AvrCommandFrame& operator = (AvrCommandFrame&& other) = default;
|
||||
|
||||
[[nodiscard]] unsigned char getProtocolVersion() const {
|
||||
return this->protocolVersion;
|
||||
|
||||
@@ -18,19 +18,19 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
FAILED = 0xA0,
|
||||
};
|
||||
|
||||
inline bool operator==(unsigned char rawId, ResponseId id) {
|
||||
inline bool operator == (unsigned char rawId, ResponseId id) {
|
||||
return static_cast<unsigned char>(id) == rawId;
|
||||
}
|
||||
|
||||
inline bool operator==(ResponseId id, unsigned char rawId) {
|
||||
inline bool operator == (ResponseId id, unsigned char rawId) {
|
||||
return static_cast<unsigned char>(id) == rawId;
|
||||
}
|
||||
|
||||
inline bool operator!=(unsigned char rawId, ResponseId id) {
|
||||
inline bool operator != (unsigned char rawId, ResponseId id) {
|
||||
return static_cast<unsigned char>(id) != rawId;
|
||||
}
|
||||
|
||||
inline bool operator!=(ResponseId id, unsigned char rawId) {
|
||||
inline bool operator != (ResponseId id, unsigned char rawId) {
|
||||
return static_cast<unsigned char>(id) != rawId;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
FAILED_WITH_DATA = 0xA1
|
||||
};
|
||||
|
||||
inline bool operator==(unsigned char rawId, ResponseId id) {
|
||||
inline bool operator == (unsigned char rawId, ResponseId id) {
|
||||
return static_cast<unsigned char>(id) == rawId;
|
||||
}
|
||||
|
||||
inline bool operator==(ResponseId id, unsigned char rawId) {
|
||||
inline bool operator == (ResponseId id, unsigned char rawId) {
|
||||
return rawId == id;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,14 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
this->initFromAvrResponses(AVRResponses);
|
||||
}
|
||||
|
||||
virtual ~AvrResponseFrame() = default;
|
||||
|
||||
AvrResponseFrame(const AvrResponseFrame& other) = default;
|
||||
AvrResponseFrame(AvrResponseFrame&& other) = default;
|
||||
|
||||
AvrResponseFrame& operator = (const AvrResponseFrame& other) = default;
|
||||
AvrResponseFrame& operator = (AvrResponseFrame&& other) = default;
|
||||
|
||||
/**
|
||||
* An AVRResponse contains a single fragment of an AvrResponseFrame.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user