Moved vFlashDone GDB command packet handelr to separate class

This commit is contained in:
Nav
2022-06-05 16:15:12 +01:00
parent 9b8d4f054b
commit 40b1183f6b
5 changed files with 65 additions and 6 deletions

View File

@@ -6,6 +6,7 @@
#include "CommandPackets/ReadMemoryMap.hpp"
#include "CommandPackets/FlashErase.hpp"
#include "CommandPackets/FlashWrite.hpp"
#include "CommandPackets/FlashDone.hpp"
namespace Bloom::DebugServer::Gdb::AvrGdb
{
@@ -38,6 +39,7 @@ namespace Bloom::DebugServer::Gdb::AvrGdb
using AvrGdb::CommandPackets::ReadMemoryMap;
using AvrGdb::CommandPackets::FlashErase;
using AvrGdb::CommandPackets::FlashWrite;
using AvrGdb::CommandPackets::FlashDone;
if (rawPacket.size() >= 2) {
if (rawPacket[1] == 'm') {
@@ -61,6 +63,10 @@ namespace Bloom::DebugServer::Gdb::AvrGdb
if (rawPacketString.find("vFlashWrite") == 0) {
return std::make_unique<FlashWrite>(rawPacket);
}
if (rawPacketString.find("vFlashDone") == 0) {
return std::make_unique<FlashDone>(rawPacket);
}
}
return GdbRspDebugServer::resolveCommandPacket(rawPacket);