diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/ReadLock.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/ReadLock.hpp new file mode 100644 index 00000000..af0c9b6a --- /dev/null +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/ReadLock.hpp @@ -0,0 +1,33 @@ +#pragma once + +#include + +#include "AvrIspCommandFrame.hpp" + +namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp +{ + class ReadLock: public AvrIspCommandFrame> + { + public: + explicit ReadLock(std::uint8_t returnAddress) { + /* + * The read lock command consists of 6 bytes: + * + * 1. Command ID (0x1A) + * 2. Return Address + * 3. CMD1 + * 4. CMD2 + * 5. CMD3 + * 6. CMD4 + */ + this->payload = { + 0x1A, + returnAddress, + 0x58, + 0x00, + 0x00, + 0x00, + }; + } + }; +}