diff options
author | Dean Camera <[email protected]> | 2009-06-15 04:38:42 +0000 |
---|---|---|
committer | Dean Camera <[email protected]> | 2009-06-15 04:38:42 +0000 |
commit | b7049da11b6fe3c37b23d8f7dddfff08ba14f449 (patch) | |
tree | 0cb3b12bf41561fe31dfc8472012ae69a1d105c2 /LUFA/Drivers/USB/Class/Host | |
parent | afe6ae14023c7040befe73e49d00077d3425c564 (diff) | |
download | qmk_firmware-b7049da11b6fe3c37b23d8f7dddfff08ba14f449.tar.gz qmk_firmware-b7049da11b6fe3c37b23d8f7dddfff08ba14f449.zip |
Enhanced class drivers to use the same public/private section seperations as other portions of the library.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host')
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/Audio.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/CDC.c | 2 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/CDC.h | 34 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/HID.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/MIDI.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/MassStorage.h | 3 | ||||
-rw-r--r-- | LUFA/Drivers/USB/Class/Host/StillImage.h | 3 |
7 files changed, 35 insertions, 16 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/Audio.h b/LUFA/Drivers/USB/Class/Host/Audio.h index 0047b0f923..694a2a33d4 100644 --- a/LUFA/Drivers/USB/Class/Host/Audio.h +++ b/LUFA/Drivers/USB/Class/Host/Audio.h @@ -49,7 +49,8 @@ extern "C" {
#endif
- /* Function Prototypes: */
+ /* Public Interface - May be used in end-application: */
+ /* Function Prototypes: */
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c index 30970f1191..32cc9e6eb3 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.c +++ b/LUFA/Drivers/USB/Class/Host/CDC.c @@ -43,7 +43,7 @@ static uint8_t CDC_Host_ProcessConfigDescriptor(void) if (USB_GetDeviceConfigDescriptor(&ConfigDescriptorSize, NULL) != HOST_SENDCONTROL_Successful)
return ControlError;
- if (ConfigDescriptorSize > MAX_CONFIG_DESCRIPTOR_SIZE)
+ if (ConfigDescriptorSize > 512)
return DescriptorTooLarge;
ConfigDescriptorData = alloca(ConfigDescriptorSize);
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.h b/LUFA/Drivers/USB/Class/Host/CDC.h index 35c2b27168..292411be40 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.h +++ b/LUFA/Drivers/USB/Class/Host/CDC.h @@ -49,16 +49,30 @@ extern "C" {
#endif
- /* Function Prototypes: */
- #if defined(INCLUDE_FROM_CDC_CLASS_HOST_C)
- static uint8_t CDC_Host_ProcessConfigDescriptor(void);
- static uint8_t DComp_CDC_Host_NextCDCControlInterface(void* CurrentDescriptor);
- static uint8_t DComp_CDC_Host_NextCDCDataInterface(void* CurrentDescriptor);
- static uint8_t DComp_CDC_Host_NextInterfaceCDCDataEndpoint(void* CurrentDescriptor);
- #endif
-
- void CDC_Host_Task(void);
-
+ /* Public Interface - May be used in end-application: */
+ /* Function Prototypes: */
+ void CDC_Host_Task(void);
+
+ /* Private Interface - For use in library only: */
+ #if !defined(__DOXYGEN__)
+ /* Macros: */
+ #define CDC_CONTROL_CLASS 0x02
+ #define CDC_CONTROL_SUBCLASS 0x02
+ #define CDC_CONTROL_PROTOCOL 0x01
+ #define CDC_DATA_CLASS 0x0A
+ #define CDC_DATA_SUBCLASS 0x00
+ #define CDC_DATA_PROTOCOL 0x00
+
+ /* Function Prototypes: */
+ #if defined(INCLUDE_FROM_CDC_CLASS_HOST_C)
+ static uint8_t CDC_Host_ProcessConfigDescriptor(void);
+ static uint8_t DComp_CDC_Host_NextCDCControlInterface(void* CurrentDescriptor);
+ static uint8_t DComp_CDC_Host_NextCDCDataInterface(void* CurrentDescriptor);
+ static uint8_t DComp_CDC_Host_NextInterfaceCDCDataEndpoint(void* CurrentDescriptor);
+ #endif
+
+ #endif
+
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h index d632466cf0..56bf04f7e5 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.h +++ b/LUFA/Drivers/USB/Class/Host/HID.h @@ -49,7 +49,8 @@ extern "C" {
#endif
- /* Function Prototypes: */
+ /* Public Interface - May be used in end-application: */
+ /* Function Prototypes: */
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.h b/LUFA/Drivers/USB/Class/Host/MIDI.h index b35fb6d64e..4bfe1afee4 100644 --- a/LUFA/Drivers/USB/Class/Host/MIDI.h +++ b/LUFA/Drivers/USB/Class/Host/MIDI.h @@ -49,7 +49,8 @@ extern "C" {
#endif
- /* Function Prototypes: */
+ /* Public Interface - May be used in end-application: */
+ /* Function Prototypes: */
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h index 4a694f38c7..e87a914371 100644 --- a/LUFA/Drivers/USB/Class/Host/MassStorage.h +++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h @@ -49,7 +49,8 @@ extern "C" {
#endif
- /* Function Prototypes: */
+ /* Public Interface - May be used in end-application: */
+ /* Function Prototypes: */
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h index b522fb7e63..c83ad5bd5b 100644 --- a/LUFA/Drivers/USB/Class/Host/StillImage.h +++ b/LUFA/Drivers/USB/Class/Host/StillImage.h @@ -49,7 +49,8 @@ extern "C" {
#endif
- /* Function Prototypes: */
+ /* Public Interface - May be used in end-application: */
+ /* Function Prototypes: */
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
|