aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Host/MassStorage.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-09-01 13:35:30 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-09-01 13:35:30 +0000
commit5908e28e8d301ab5688966311bc769247ba98363 (patch)
tree570754562965cf412f860c8ccfff67bb53b0ee34 /LUFA/Drivers/USB/Class/Host/MassStorage.c
parentbda4bd45016714e892252fc7aaee88f6d20af231 (diff)
downloadlufa-5908e28e8d301ab5688966311bc769247ba98363.tar.gz
lufa-5908e28e8d301ab5688966311bc769247ba98363.tar.bz2
lufa-5908e28e8d301ab5688966311bc769247ba98363.zip
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.
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 6a8373adc..678c070c0 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;
}