From 50ef525c4320af7f31ad1d83a7d52f85805e2162 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 5 Mar 2022 17:57:05 +0000 Subject: [PATCH] Getter function for AvrIspInterface instance, in the debug tool class --- src/DebugToolDrivers/DebugTool.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/DebugToolDrivers/DebugTool.hpp b/src/DebugToolDrivers/DebugTool.hpp index f5c516f5..c5c1a5e0 100644 --- a/src/DebugToolDrivers/DebugTool.hpp +++ b/src/DebugToolDrivers/DebugTool.hpp @@ -1,6 +1,7 @@ #pragma once #include "TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp" +#include "TargetInterfaces/Microchip/AVR/AvrIspInterface.hpp" namespace Bloom { @@ -51,7 +52,21 @@ namespace Bloom */ virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() { return nullptr; - }; + } + + /** + * All debug tools that support interfacing with AVR targets via the ISP interface must provide an + * implementation of the AvrIspInterface class, via this function. + * + * For debug tools that do not support the interface, a nullptr should be returned. + * + * Note: the caller of this function will not manage the lifetime of the returned AvrIspInterface instance. + * + * @return + */ + virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::AvrIspInterface* getAvrIspInterface() { + return nullptr; + } [[nodiscard]] bool isInitialised() const { return this->initialised;