aboutsummaryrefslogtreecommitdiff
path: root/LUFA/Drivers/USB/Class/Host/MassStorage.c
diff options
context:
space:
mode:
authorDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-09-01 13:35:30 +0000
committerDean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28>2009-09-01 13:35:30 +0000
commit7842c440a307c8847f4d3295d76d13df057fd4b8 (patch)
tree570754562965cf412f860c8ccfff67bb53b0ee34 /LUFA/Drivers/USB/Class/Host/MassStorage.c
parentf08dda5536738a882927b6071fbea70e4979f505 (diff)
Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting for a response block header.
Added basic PIMA commands to the StillImage Host Class driver - need to extend to PIMA specific command functions. git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@803 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host/MassStorage.c')
-rw-r--r--LUFA/Drivers/USB/Class/Host/MassStorage.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.c b/LUFA/Drivers/USB/Class/Host/MassStorage.c
index 6a8373ad..678c070c 100644
--- a/LUFA/Drivers/USB/Class/Host/MassStorage.c
+++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c
@@ -95,9 +95,12 @@ static uint8_t DComp_NextMSInterface(void* CurrentDescriptor)
{
if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)
{
- if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class == MASS_STORE_CLASS) &&
- (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == MASS_STORE_SUBCLASS) &&
- (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MASS_STORE_PROTOCOL))
+ USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,
+ USB_Descriptor_Interface_t);
+
+ if ((CurrentInterface->Class == MASS_STORE_CLASS) &&
+ (CurrentInterface->SubClass == MASS_STORE_SUBCLASS) &&
+ (CurrentInterface->Protocol == MASS_STORE_PROTOCOL))
{
return DESCRIPTOR_SEARCH_Found;
}