From 7b4e2677be9cfa5b1b09510f8dc8801513a1b33f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Wed, 28 Mar 2018 14:06:43 +0200 Subject: [PATCH] [usb] Remove handling of OutTransfer/SetupTransaction completed. Change-Id: I211f31be71a3ccc36ec33ec80b35513a1ff6943d --- ion/src/device/regs/otg.h | 4 ++-- ion/src/device/usb/device.cpp | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/ion/src/device/regs/otg.h b/ion/src/device/regs/otg.h index dab79f413..5c4f0c89e 100644 --- a/ion/src/device/regs/otg.h +++ b/ion/src/device/regs/otg.h @@ -56,8 +56,8 @@ public: enum class PKTSTS { GlobalOutNAK = 1, OutReceived = 2, - OutTransferCompleted = 3, - SetupTransactionCompleted = 4, // TODO when sniffing the usb traffic, this interrupt is only done once, after the setAdress request receives a first NAK. It does not happen again after unpluggin and replugging the calculator: problem somewhere? + OutTransferCompleted = 3, // After each Out Transaction + SetupTransactionCompleted = 4, // Supposed to be after each SETUP transaction SetupReceived = 6 }; REGS_FIELD(EPNUM, uint8_t, 3, 0); diff --git a/ion/src/device/usb/device.cpp b/ion/src/device/usb/device.cpp index 42a51600d..c07631ecc 100644 --- a/ion/src/device/usb/device.cpp +++ b/ion/src/device/usb/device.cpp @@ -24,12 +24,7 @@ void Device::poll() { assert(grxstsp.getEPNUM() == 0); if (pktsts == OTG::GRXSTSP::PKTSTS::OutTransferCompleted || pktsts == OTG::GRXSTSP::PKTSTS::SetupTransactionCompleted) { - // Reset the out endpoint - m_ep0.setupOut(); - // Set the NAK bit - m_ep0.setOutNAK(m_ep0.NAKForced()); - // Enable the endpoint - m_ep0.enableOut(); + // There is no data associated with this interrupt. return; }