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, + }; + } + }; +}