Refactored some of the USB device (libusb wrapper) & interface code
This commit is contained in:
@@ -11,11 +11,14 @@ void AtmelIce::init() {
|
||||
// TODO: Move away from hard-coding the CMSIS-DAP/EDBG interface number
|
||||
auto& usbHidInterface = this->getEdbgInterface().getUsbHidInterface();
|
||||
usbHidInterface.setNumber(0);
|
||||
usbHidInterface.setUSBDevice(this->getLibUsbDevice());
|
||||
usbHidInterface.setVendorId(this->getVendorId());
|
||||
usbHidInterface.setProductId(this->getProductId());
|
||||
usbHidInterface.setLibUsbDevice(this->libUsbDevice);
|
||||
usbHidInterface.setLibUsbDeviceHandle(this->libUsbDeviceHandle);
|
||||
usbHidInterface.setVendorId(this->vendorId);
|
||||
usbHidInterface.setProductId(this->productId);
|
||||
|
||||
if (!usbHidInterface.isInitialised()) {
|
||||
usbHidInterface.detachKernelDriver();
|
||||
UsbDevice::setConfiguration(0);
|
||||
usbHidInterface.init();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,10 @@ void PowerDebugger::init() {
|
||||
// TODO: Move away from hard-coding the CMSIS-DAP/EDBG interface number
|
||||
auto& usbHidInterface = this->getEdbgInterface().getUsbHidInterface();
|
||||
usbHidInterface.setNumber(0);
|
||||
usbHidInterface.setUSBDevice(this->getLibUsbDevice());
|
||||
usbHidInterface.setVendorId(this->getVendorId());
|
||||
usbHidInterface.setProductId(this->getProductId());
|
||||
usbHidInterface.setLibUsbDevice(this->libUsbDevice);
|
||||
usbHidInterface.setLibUsbDeviceHandle(this->libUsbDeviceHandle);
|
||||
usbHidInterface.setVendorId(this->vendorId);
|
||||
usbHidInterface.setProductId(this->productId);
|
||||
|
||||
if (!usbHidInterface.isInitialised()) {
|
||||
usbHidInterface.init();
|
||||
|
||||
@@ -26,10 +26,7 @@ namespace Bloom::DebugToolDrivers
|
||||
* as an Atmel Data Gateway Interface (DGI).
|
||||
*
|
||||
* Communication:
|
||||
* Like the Atmel-ICE, using the Power Debugger device for AVR debugging/programming requires the AVR
|
||||
* communication protocol, which is a sub-protocol of the CMSIS-DAP.
|
||||
*
|
||||
* For more information on the communication protocol, see the DebugToolDrivers::AtmelIce class.
|
||||
* Uses the same EDBG protocol as described in the AtmelIce driver. See the AtmelIce debug tool class for more.
|
||||
*
|
||||
* USB Setup:
|
||||
* Vendor ID: 0x03eb (1003)
|
||||
|
||||
Reference in New Issue
Block a user