From bb23e55f11a42f6214757483d010ebd24377caeb Mon Sep 17 00:00:00 2001 From: Dean Camera Date: Tue, 23 Jun 2009 08:45:46 +0000 Subject: Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command. --- LUFA/Drivers/USB/Class/Device/MassStorage.c | 4 ++-- LUFA/Drivers/USB/LowLevel/Pipe.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'LUFA/Drivers/USB') diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.c b/LUFA/Drivers/USB/Class/Device/MassStorage.c index a70ed68ce..073111e64 100644 --- a/LUFA/Drivers/USB/Class/Device/MassStorage.c +++ b/LUFA/Drivers/USB/Class/Device/MassStorage.c @@ -131,11 +131,11 @@ void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* MSInterfaceInfo) Endpoint_ClearStall(); Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber); Endpoint_ClearStall(); - - MSInterfaceInfo->State.IsMassStoreReset = false; } } } + + MSInterfaceInfo->State.IsMassStoreReset = false; } static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* MSInterfaceInfo) diff --git a/LUFA/Drivers/USB/LowLevel/Pipe.c b/LUFA/Drivers/USB/LowLevel/Pipe.c index aead39dc5..1376de495 100644 --- a/LUFA/Drivers/USB/LowLevel/Pipe.c +++ b/LUFA/Drivers/USB/LowLevel/Pipe.c @@ -48,8 +48,7 @@ bool Pipe_ConfigurePipe(const uint8_t Number, const uint8_t Type, const uint8_t UPCFG0X = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0)); UPCFG1X = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size)); - if (Token == PIPE_TOKEN_IN) - Pipe_SetInfiniteINRequests(); + Pipe_SetInfiniteINRequests(); return Pipe_IsConfigured(); } -- cgit v1.2.3