From 97cc3cdce39885a60aa79d69d2083d981e85b990 Mon Sep 17 00:00:00 2001 From: Nav Date: Wed, 16 Mar 2022 17:12:19 +0000 Subject: [PATCH] EDBG Parameters for LED and Target Power control --- .../CMSIS-DAP/VendorSpecific/EDBG/Edbg.hpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/Edbg.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/Edbg.hpp index 1b4695f5..04b16d5c 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/Edbg.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/Edbg.hpp @@ -1,5 +1,7 @@ #pragma once +#include + namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg { enum class ProtocolHandlerId: unsigned char @@ -11,5 +13,21 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg AVR32_GENERIC = 0x13, EDBG_CONTROL = 0x20, }; + + struct EdbgParameter + { + unsigned char context = 0x00; + unsigned char id = 0x00; + std::uint8_t size = 0; + + constexpr EdbgParameter() = default; + constexpr EdbgParameter(unsigned char context, unsigned char id, std::uint8_t size) + : context(context), id(id), size(size) {}; + }; + + struct EdbgParameters + { + static constexpr EdbgParameter CONTROL_LED_USAGE {0x00, 0x00, 1}; + static constexpr EdbgParameter CONTROL_TARGET_POWER {0x00, 0x10, 1}; }; }