diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp index 85935b25..6e85f545 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp @@ -35,7 +35,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap } std::size_t getUsbHidInputReportSize() { - return this->usbHidInterface.getInputReportSize(); + return this->usbHidInterface.inputReportSize; } void setMinimumCommandTimeGap(std::chrono::milliseconds commandTimeGap) { diff --git a/src/DebugToolDrivers/USB/HID/HidInterface.cpp b/src/DebugToolDrivers/USB/HID/HidInterface.cpp index b7a0b02b..a51a75ab 100644 --- a/src/DebugToolDrivers/USB/HID/HidInterface.cpp +++ b/src/DebugToolDrivers/USB/HID/HidInterface.cpp @@ -75,18 +75,18 @@ namespace Bloom::Usb } void HidInterface::write(std::vector&& buffer) { - if (buffer.size() > this->getInputReportSize()) { + if (buffer.size() > this->inputReportSize) { throw DeviceCommunicationFailure( "Cannot send data via HID interface - data exceeds maximum packet size." ); } - if (buffer.size() < this->getInputReportSize()) { + if (buffer.size() < this->inputReportSize) { /* * Every report we send via the USB HID interface should be of a fixed size. * In the event of a report being too small, we just fill the buffer vector with 0. */ - buffer.resize(this->getInputReportSize(), 0); + buffer.resize(this->inputReportSize, 0); } int transferred = 0; diff --git a/src/DebugToolDrivers/USB/HID/HidInterface.hpp b/src/DebugToolDrivers/USB/HID/HidInterface.hpp index 02cfecc7..e0602d2f 100644 --- a/src/DebugToolDrivers/USB/HID/HidInterface.hpp +++ b/src/DebugToolDrivers/USB/HID/HidInterface.hpp @@ -37,10 +37,6 @@ namespace Bloom::Usb HidInterface(HidInterface&& other) = default; HidInterface& operator = (HidInterface&& other) = default; - std::size_t getInputReportSize() const { - return this->inputReportSize; - } - /** * Obtains a hid_device instance and claims the HID interface on the device. */