From acb38c3a64ef7d76412a30ceecca03b41896cc18 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 16 Mar 2022 17:10:08 +0000 Subject: [PATCH] EDBG Control protocol get parameter command --- .../EDBGControl/GetParameter.hpp | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/EDBGControl/GetParameter.hpp diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/EDBGControl/GetParameter.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/EDBGControl/GetParameter.hpp new file mode 100644 index 00000000..3290c509 --- /dev/null +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/EDBGControl/GetParameter.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include + +#include "EdbgControlCommandFrame.hpp" + +namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::EdbgControl +{ + class GetParameter: public EdbgControlCommandFrame> + { + public: + explicit GetParameter(const EdbgParameter& parameter) { + /* + * The EDBG Get Parameter command consists of 6 bytes: + * + * 1. Command ID (0x02) + * 2. Version (0x00) + * 3. Parameter context + * 4. Parameter + * 5. Parameter size + */ + this->payload = { + 0x02, + 0x00, + parameter.context, + parameter.id, + parameter.size, + }; + } + }; +}