This commit is contained in:
Nav
2022-11-16 23:51:07 +00:00
parent 4a9e99f053
commit f2d09641a1
6 changed files with 15 additions and 12 deletions

View File

@@ -30,17 +30,17 @@ namespace Bloom::DebugToolDrivers
void EdbgDevice::init() {
UsbDevice::init();
auto usbHidInterface = Usb::HidInterface(this->cmsisHidInterfaceNumber, this->vendorId, this->productId);
auto cmsisHidInterface = Usb::HidInterface(this->cmsisHidInterfaceNumber, this->vendorId, this->productId);
this->detachKernelDriverFromInterface(usbHidInterface.interfaceNumber);
this->detachKernelDriverFromInterface(cmsisHidInterface.interfaceNumber);
if (this->configurationIndex.has_value()) {
this->setConfiguration(this->configurationIndex.value());
}
usbHidInterface.init();
cmsisHidInterface.init();
this->edbgInterface = std::make_unique<EdbgInterface>(std::move(usbHidInterface));
this->edbgInterface = std::make_unique<EdbgInterface>(std::move(cmsisHidInterface));
/*
* The EDBG/CMSIS-DAP interface doesn't operate properly when sending commands too quickly.

View File

@@ -8,8 +8,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg
{
using namespace Bloom::Exceptions;
EdbgInterface::EdbgInterface(Usb::HidInterface&& usbHidInterface)
: CmsisDapInterface(std::move(usbHidInterface))
EdbgInterface::EdbgInterface(Usb::HidInterface&& cmsisHidInterface)
: CmsisDapInterface(std::move(cmsisHidInterface))
{}
Protocols::CmsisDap::Response EdbgInterface::sendAvrCommandsAndWaitForResponse(

View File

@@ -24,7 +24,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg
class EdbgInterface: public CmsisDapInterface
{
public:
explicit EdbgInterface(Usb::HidInterface&& usbHidInterface);
explicit EdbgInterface(Usb::HidInterface&& cmsisHidInterface);
/**
* Send an AvrCommandFrame to the debug tool and wait for a response.