forked from mfulz_github/qmk_firmware
Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command.
This commit is contained in:
parent
a3a04aa671
commit
bb23e55f11
|
@ -218,9 +218,6 @@ void MassStorage_Task(void)
|
||||||
Endpoint_ClearStall();
|
Endpoint_ClearStall();
|
||||||
Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
|
Endpoint_SelectEndpoint(MASS_STORAGE_IN_EPNUM);
|
||||||
Endpoint_ClearStall();
|
Endpoint_ClearStall();
|
||||||
|
|
||||||
/* Clear the abort transfer flag */
|
|
||||||
IsMassStoreReset = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Indicate ready */
|
/* Indicate ready */
|
||||||
|
@ -232,6 +229,9 @@ void MassStorage_Task(void)
|
||||||
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
LEDs_SetAllLEDs(LEDMASK_USB_ERROR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Clear the abort transfer flag */
|
||||||
|
IsMassStoreReset = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,7 @@ static uint8_t MassStore_SendCommand(void)
|
||||||
/* Send the data in the OUT pipe to the attached device */
|
/* Send the data in the OUT pipe to the attached device */
|
||||||
Pipe_ClearOUT();
|
Pipe_ClearOUT();
|
||||||
|
|
||||||
|
/* Wait until command has been sent */
|
||||||
while(!(Pipe_IsOUTReady()));
|
while(!(Pipe_IsOUTReady()));
|
||||||
|
|
||||||
/* Freeze pipe after use */
|
/* Freeze pipe after use */
|
||||||
|
|
|
@ -131,11 +131,11 @@ void MS_Device_USBTask(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
|
||||||
Endpoint_ClearStall();
|
Endpoint_ClearStall();
|
||||||
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
|
Endpoint_SelectEndpoint(MSInterfaceInfo->Config.DataINEndpointNumber);
|
||||||
Endpoint_ClearStall();
|
Endpoint_ClearStall();
|
||||||
|
|
||||||
MSInterfaceInfo->State.IsMassStoreReset = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MSInterfaceInfo->State.IsMassStoreReset = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
|
static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* MSInterfaceInfo)
|
||||||
|
|
|
@ -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));
|
UPCFG0X = ((Type << EPTYPE0) | Token | ((EndpointNumber & PIPE_EPNUM_MASK) << PEPNUM0));
|
||||||
UPCFG1X = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
|
UPCFG1X = ((1 << ALLOC) | Banks | Pipe_BytesToEPSizeMask(Size));
|
||||||
|
|
||||||
if (Token == PIPE_TOKEN_IN)
|
Pipe_SetInfiniteINRequests();
|
||||||
Pipe_SetInfiniteINRequests();
|
|
||||||
|
|
||||||
return Pipe_IsConfigured();
|
return Pipe_IsConfigured();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,11 @@
|
||||||
* - Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number,
|
* - Added new USE_INTERNAL_SERIAL define for using the unique serial numbers in some AVR models as the USB device's serial number,
|
||||||
* added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code
|
* added NO_INTERNAL_SERIAL compile time option to turn off new serial number reading code
|
||||||
* - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
|
* - Fixed ADC driver for the ATMEGA32U4 and ATMEGA16U4 (thanks to Opendous Inc.)
|
||||||
|
* - Fixed CDCHost demo unfreezing the pipes at the point of configuration, rather than use
|
||||||
* - Pipe stream functions now automatically set the correct pipe token, so that bidirectional pipes can be used
|
* - Pipe stream functions now automatically set the correct pipe token, so that bidirectional pipes can be used
|
||||||
* - Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling
|
* - Pipe_ConfigurePipe() now automatically defaults IN pipes to accepting infinite IN requests, this can still be changed by calling
|
||||||
* the existing \ref Pipe_SetFiniteINRequests() function
|
* the existing \ref Pipe_SetFiniteINRequests() function
|
||||||
|
* - Fixed MassStorage demo not clearing the reset flag when a Mass Storage Reset is issued while not processing a command
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* \section Sec_ChangeLog090605 Version 090605
|
* \section Sec_ChangeLog090605 Version 090605
|
||||||
|
|
Loading…
Reference in New Issue