New TargetPowerManagementInterface class, for debug tools that support target power management functions
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "TargetInterfaces/TargetPowerManagementInterface.hpp"
|
||||||
|
|
||||||
#include "TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp"
|
#include "TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp"
|
||||||
#include "TargetInterfaces/Microchip/AVR/AvrIspInterface.hpp"
|
#include "TargetInterfaces/Microchip/AVR/AvrIspInterface.hpp"
|
||||||
|
|
||||||
@@ -40,6 +42,21 @@ namespace Bloom
|
|||||||
|
|
||||||
virtual std::string getSerialNumber() = 0;
|
virtual std::string getSerialNumber() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* All debug tools that support target power management functions must provide an implementation of the
|
||||||
|
* TargetPowerManagementInterface class, via this function.
|
||||||
|
*
|
||||||
|
* For debug tools that cannot manage target power, a nullptr should be returned.
|
||||||
|
*
|
||||||
|
* Note: the caller of this function will not manage the lifetime of the returned TargetPowerManagementInterface
|
||||||
|
* instance.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
virtual DebugToolDrivers::TargetInterfaces::TargetPowerManagementInterface* getTargetPowerManagementInterface() {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All debug tools that support debugging operations on AVR8 targets must provide an implementation of
|
* All debug tools that support debugging operations on AVR8 targets must provide an implementation of
|
||||||
* the Avr8DebugInterface class, via this function.
|
* the Avr8DebugInterface class, via this function.
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace Bloom::DebugToolDrivers::TargetInterfaces
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Some debug tools provide target power management functions. Those that do should expose an implementation of
|
||||||
|
* this interface via DebugTool::getTargetPowerManagementInterface();
|
||||||
|
*/
|
||||||
|
class TargetPowerManagementInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TargetPowerManagementInterface() = default;
|
||||||
|
virtual ~TargetPowerManagementInterface() = default;
|
||||||
|
|
||||||
|
TargetPowerManagementInterface(const TargetPowerManagementInterface& other) = default;
|
||||||
|
TargetPowerManagementInterface(TargetPowerManagementInterface&& other) = default;
|
||||||
|
|
||||||
|
TargetPowerManagementInterface& operator = (const TargetPowerManagementInterface& other) = default;
|
||||||
|
TargetPowerManagementInterface& operator = (TargetPowerManagementInterface&& other) = default;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should enable the target power if currently disabled.
|
||||||
|
*/
|
||||||
|
virtual void enableTargetPower() = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should disable the target power if currently enabled.
|
||||||
|
*/
|
||||||
|
virtual void disableTargetPower() = 0;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user