This commit is contained in:
Nav
2022-01-11 21:12:25 +00:00
parent 023b655145
commit d462358b1e
21 changed files with 128 additions and 23 deletions

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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.
*