[usb] Remove handling of OutTransfer/SetupTransaction completed.

Change-Id: I211f31be71a3ccc36ec33ec80b35513a1ff6943d
This commit is contained in:
Léa Saviot
2018-03-28 14:06:43 +02:00
parent 7388b2bc6f
commit 7b4e2677be
2 changed files with 3 additions and 8 deletions

View File

@@ -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);

View File

@@ -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;
}