aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2010-10-24 22:53:57 +0000
committerDean Camera <dean@fourwalledcubicle.com>2010-10-24 22:53:57 +0000
commitb37d77eab32d171ad7b28157a924a4026e2aebd1 (patch)
tree0644f7ed8f76db5e0849195e09892b159df9f475 /LUFA
parent8f3bee7d8661c92ce69fdf7cc131fbee1acaa4ae (diff)
downloadlufa-b37d77eab32d171ad7b28157a924a4026e2aebd1.tar.gz
lufa-b37d77eab32d171ad7b28157a924a4026e2aebd1.tar.bz2
lufa-b37d77eab32d171ad7b28157a924a4026e2aebd1.zip
All USB class drivers are now automatically included when LUFA/Drivers/USB.h is included, and no longer need to be seperately included.
All LowLevel demos changed to use the constants and types defined in the USB class drivers.
Diffstat (limited to 'LUFA')
-rw-r--r--LUFA/Drivers/USB/Class/Audio.h8
-rw-r--r--LUFA/Drivers/USB/Class/CDC.h8
-rw-r--r--LUFA/Drivers/USB/Class/Common/Audio.h8
-rw-r--r--LUFA/Drivers/USB/Class/Common/CDC.h23
-rw-r--r--LUFA/Drivers/USB/Class/Common/HID.h8
-rw-r--r--LUFA/Drivers/USB/Class/Common/MIDI.h8
-rw-r--r--LUFA/Drivers/USB/Class/Common/MassStorage.h8
-rw-r--r--LUFA/Drivers/USB/Class/Common/Printer.h24
-rw-r--r--LUFA/Drivers/USB/Class/Common/RNDIS.h8
-rw-r--r--LUFA/Drivers/USB/Class/Common/RNDISConstants.h4
-rw-r--r--LUFA/Drivers/USB/Class/Common/StillImage.h42
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.c1
-rw-r--r--LUFA/Drivers/USB/Class/Device/Audio.h10
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDC.c2
-rw-r--r--LUFA/Drivers/USB/Class/Device/CDC.h29
-rw-r--r--LUFA/Drivers/USB/Class/Device/HID.c1
-rw-r--r--LUFA/Drivers/USB/Class/Device/HID.h11
-rw-r--r--LUFA/Drivers/USB/Class/Device/MIDI.c1
-rw-r--r--LUFA/Drivers/USB/Class/Device/MIDI.h10
-rw-r--r--LUFA/Drivers/USB/Class/Device/MassStorage.c2
-rw-r--r--LUFA/Drivers/USB/Class/Device/MassStorage.h12
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDIS.c2
-rw-r--r--LUFA/Drivers/USB/Class/Device/RNDIS.h13
-rw-r--r--LUFA/Drivers/USB/Class/HID.h8
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDC.c2
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDC.h33
-rw-r--r--LUFA/Drivers/USB/Class/Host/HID.c2
-rw-r--r--LUFA/Drivers/USB/Class/Host/HID.h13
-rw-r--r--LUFA/Drivers/USB/Class/Host/HIDParser.c1
-rw-r--r--LUFA/Drivers/USB/Class/Host/HIDParser.h4
-rw-r--r--LUFA/Drivers/USB/Class/Host/MIDI.c2
-rw-r--r--LUFA/Drivers/USB/Class/Host/MIDI.h12
-rw-r--r--LUFA/Drivers/USB/Class/Host/MassStorage.c6
-rw-r--r--LUFA/Drivers/USB/Class/Host/MassStorage.h15
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.c8
-rw-r--r--LUFA/Drivers/USB/Class/Host/Printer.h16
-rw-r--r--LUFA/Drivers/USB/Class/Host/RNDIS.c2
-rw-r--r--LUFA/Drivers/USB/Class/Host/RNDIS.h12
-rw-r--r--LUFA/Drivers/USB/Class/Host/StillImage.c32
-rw-r--r--LUFA/Drivers/USB/Class/Host/StillImage.h18
-rw-r--r--LUFA/Drivers/USB/Class/MIDI.h8
-rw-r--r--LUFA/Drivers/USB/Class/MassStorage.h8
-rw-r--r--LUFA/Drivers/USB/Class/Printer.h8
-rw-r--r--LUFA/Drivers/USB/Class/RNDIS.h8
-rw-r--r--LUFA/Drivers/USB/Class/StillImage.h8
-rw-r--r--LUFA/Drivers/USB/USB.h9
-rw-r--r--LUFA/ManPages/ChangeLog.txt3
-rw-r--r--LUFA/ManPages/MigrationInformation.txt3
48 files changed, 264 insertions, 220 deletions
diff --git a/LUFA/Drivers/USB/Class/Audio.h b/LUFA/Drivers/USB/Class/Audio.h
index b28133811..5216e0d57 100644
--- a/LUFA/Drivers/USB/Class/Audio.h
+++ b/LUFA/Drivers/USB/Class/Audio.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassAudio Audio Class Driver - LUFA/Drivers/Class/Audio.h
+ * @defgroup Group_USBClassAudio Audio Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -59,16 +59,12 @@
#define _AUDIO_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_AUDIO_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_AUDIO_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_DEVICE)
#include "Device/Audio.h"
#endif
diff --git a/LUFA/Drivers/USB/Class/CDC.h b/LUFA/Drivers/USB/Class/CDC.h
index 988edcdd7..87ecd84b1 100644
--- a/LUFA/Drivers/USB/Class/CDC.h
+++ b/LUFA/Drivers/USB/Class/CDC.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassCDC CDC-ACM (Virtual Serial) Class Driver - LUFA/Drivers/Class/CDC.h
+ * @defgroup Group_USBClassCDC CDC-ACM (Virtual Serial) Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -60,16 +60,12 @@
#define _CDC_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_CDC_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_CDC_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_DEVICE)
#include "Device/CDC.h"
#endif
diff --git a/LUFA/Drivers/USB/Class/Common/Audio.h b/LUFA/Drivers/USB/Class/Common/Audio.h
index 5e65865a0..b848015e0 100644
--- a/LUFA/Drivers/USB/Class/Common/Audio.h
+++ b/LUFA/Drivers/USB/Class/Common/Audio.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB Audio 1.0 Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/Audio.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassAudio
@@ -51,7 +51,7 @@
#define _AUDIO_CLASS_COMMON_H_
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include <string.h>
@@ -62,7 +62,7 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_AUDIO_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/Audio.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Common/CDC.h b/LUFA/Drivers/USB/Class/Common/CDC.h
index 6d2c519b8..eb6577e5c 100644
--- a/LUFA/Drivers/USB/Class/Common/CDC.h
+++ b/LUFA/Drivers/USB/Class/Common/CDC.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB CDC Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/CDC.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassCDC
@@ -51,7 +51,7 @@
#define _CDC_CLASS_COMMON_H_
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include <string.h>
@@ -62,7 +62,7 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_CDC_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/CDC.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
@@ -308,6 +308,21 @@
uint8_t bMasterInterface; /**< Interface number of the CDC Control interface. */
uint8_t bSlaveInterface0; /**< Interface number of the CDC Data interface. */
} USB_CDC_StdDescriptor_FunctionalUnion_t;
+
+ /** Type define for a CDC Line Encoding structure, used to hold the various encoding parameters for a virtual
+ * serial port.
+ */
+ typedef struct
+ {
+ uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second. */
+ uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the
+ * \ref CDC_LineEncodingFormats_t enum.
+ */
+ uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the
+ * \ref CDC_LineEncodingParity_t enum.
+ */
+ uint8_t DataBits; /**< Bits of data per character of the virtual serial port. */
+ } CDC_LineEncoding_t;
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Class/Common/HID.h b/LUFA/Drivers/USB/Class/Common/HID.h
index 3658c8eba..b5d095e08 100644
--- a/LUFA/Drivers/USB/Class/Common/HID.h
+++ b/LUFA/Drivers/USB/Class/Common/HID.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB HID Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/HID.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassHID
@@ -51,13 +51,13 @@
#define _HID_CLASS_COMMON_H_
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include <string.h>
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_HID_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/HID.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Common/MIDI.h b/LUFA/Drivers/USB/Class/Common/MIDI.h
index ef3f8fcef..22e32479f 100644
--- a/LUFA/Drivers/USB/Class/Common/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Common/MIDI.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB MIDI Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/MIDI.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassMIDI
@@ -54,7 +54,7 @@
#define __INCLUDE_FROM_AUDIO_DRIVER
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include "Audio.h"
#include <string.h>
@@ -66,7 +66,7 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_MIDI_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/MIDI.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Common/MassStorage.h b/LUFA/Drivers/USB/Class/Common/MassStorage.h
index dea847c13..e8693335d 100644
--- a/LUFA/Drivers/USB/Class/Common/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Common/MassStorage.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB Mass Storage Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/MassStorage.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassMS
@@ -51,7 +51,7 @@
#define _MS_CLASS_COMMON_H_
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include <string.h>
@@ -62,7 +62,7 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_MS_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/MassStorage.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Common/Printer.h b/LUFA/Drivers/USB/Class/Common/Printer.h
index 97e94a3bc..03ae12e59 100644
--- a/LUFA/Drivers/USB/Class/Common/Printer.h
+++ b/LUFA/Drivers/USB/Class/Common/Printer.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB Printer Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/Printer.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassPrinter
@@ -51,7 +51,7 @@
#define _PRINTER_CLASS_COMMON_H_
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include <string.h>
@@ -62,7 +62,7 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_PRINTER_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/Printer.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
@@ -75,6 +75,22 @@
/** Port status mask for a printer device, indicating that the device is currently out of paper. */
#define PRNT_PORTSTATUS_PAPEREMPTY (1 << 5)
+ /* Enums: */
+ /** Enum for the Printer class specific control requests that can be issued by the USB bus host. */
+ enum PRNT_ClassRequests_t
+ {
+ PRNT_REQ_GetDeviceID = 0x00, /**< Printer class-specific request to retrieve the Unicode ID
+ * string of the device, containing the device's name, manufacturer
+ * and supported printer languages.
+ */
+ PRNT_REQ_GetPortStatus = 0x01, /**< Printer class-specific request to get the current status of the
+ * virtual printer port, for device selection and ready states.
+ */
+ PRNT_REQ_SoftReset = 0x02, /**< Printer class-specific request to reset the device, ready for new
+ * printer commands.
+ */
+ };
+
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
diff --git a/LUFA/Drivers/USB/Class/Common/RNDIS.h b/LUFA/Drivers/USB/Class/Common/RNDIS.h
index 6b5234b13..ae2d5bd54 100644
--- a/LUFA/Drivers/USB/Class/Common/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Common/RNDIS.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB RNDIS Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/RNDIS.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassRNDIS
@@ -54,7 +54,7 @@
#define __INCLUDE_FROM_CDC_DRIVER
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include "RNDISConstants.h"
#include "CDC.h"
@@ -67,7 +67,7 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_RNDIS_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/RNDIS.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
diff --git a/LUFA/Drivers/USB/Class/Common/RNDISConstants.h b/LUFA/Drivers/USB/Class/Common/RNDISConstants.h
index 8edbbd701..2b955d095 100644
--- a/LUFA/Drivers/USB/Class/Common/RNDISConstants.h
+++ b/LUFA/Drivers/USB/Class/Common/RNDISConstants.h
@@ -33,8 +33,8 @@
*
* Common RNDIS class constant definitions.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/Audio.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \file
diff --git a/LUFA/Drivers/USB/Class/Common/StillImage.h b/LUFA/Drivers/USB/Class/Common/StillImage.h
index 2ba4227ac..bb9460934 100644
--- a/LUFA/Drivers/USB/Class/Common/StillImage.h
+++ b/LUFA/Drivers/USB/Class/Common/StillImage.h
@@ -33,8 +33,8 @@
*
* Common definitions and declarations for the library USB Still Image Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/StillImage.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassSI
@@ -51,7 +51,7 @@
#define _SI_CLASS_COMMON_H_
/* Includes: */
- #include "../../USB.h"
+ #include "../../HighLevel/StdDescriptors.h"
#include <string.h>
@@ -62,7 +62,7 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_SI_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/StillImage.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
/* Macros: */
@@ -79,42 +79,42 @@
*
* \param[in] Params Number of parameters which are to be sent in the Param field of the container.
*/
- #define PIMA_COMMAND_SIZE(Params) ((sizeof(SI_PIMA_Container_t) - 12) + ((Params) * sizeof(uint32_t)))
+ #define PIMA_COMMAND_SIZE(Params) ((sizeof(PIMA_Container_t) - 12) + ((Params) * sizeof(uint32_t)))
/** Used in the DataLength field of a PIMA container, to give the total container size in bytes for
* a data container.
*
* \param[in] DataLen Length in bytes of the data in the container.
*/
- #define PIMA_DATA_SIZE(DataLen) ((sizeof(SI_PIMA_Container_t) - 12) + (DataLen))
+ #define PIMA_DATA_SIZE(DataLen) ((sizeof(PIMA_Container_t) - 12) + (DataLen))
/* Enums: */
/** Enum for the possible PIMA contains types. */
- enum SI_PIMA_Container_Types_t
+ enum PIMA_Container_Types_t
{
- SI_PIMA_CONTAINER_Undefined = 0, /**< Undefined container type. */
- SI_PIMA_CONTAINER_CommandBlock = 1, /**< Command Block container type. */
- SI_PIMA_CONTAINER_DataBlock = 2, /**< Data Block container type. */
- SI_PIMA_CONTAINER_ResponseBlock = 3, /**< Response container type. */
- SI_PIMA_CONTAINER_EventBlock = 4, /**< Event Block container type. */
+ PIMA_CONTAINER_Undefined = 0, /**< Undefined container type. */
+ PIMA_CONTAINER_CommandBlock = 1, /**< Command Block container type. */
+ PIMA_CONTAINER_DataBlock = 2, /**< Data Block container type. */
+ PIMA_CONTAINER_ResponseBlock = 3, /**< Response container type. */
+ PIMA_CONTAINER_EventBlock = 4, /**< Event Block container type. */
};
/* Enums: */
/** Enums for the possible status codes of a returned Response Block from an attached PIMA compliant Still Image device. */
- enum SI_PIMA_ResponseCodes_t
+ enum PIMA_ResponseCodes_t
{
- SI_PIMA_RESPONSE_OK = 1, /**< Response code indicating no error in the issued command. */
- SI_PIMA_RESPONSE_GeneralError = 2, /**< Response code indicating a general error while processing the
+ PIMA_RESPONSE_OK = 1, /**< Response code indicating no error in the issued command. */
+ PIMA_RESPONSE_GeneralError = 2, /**< Response code indicating a general error while processing the
* issued command.
*/
- SI_PIMA_RESPONSE_SessionNotOpen = 3, /**< Response code indicating that the sent command requires an open
+ PIMA_RESPONSE_SessionNotOpen = 3, /**< Response code indicating that the sent command requires an open
* session before being issued.
*/
- SI_PIMA_RESPONSE_InvalidTransaction = 4, /**< Response code indicating an invalid transaction occurred. */
- SI_PIMA_RESPONSE_OperationNotSupported = 5, /**< Response code indicating that the issued command is not supported
+ PIMA_RESPONSE_InvalidTransaction = 4, /**< Response code indicating an invalid transaction occurred. */
+ PIMA_RESPONSE_OperationNotSupported = 5, /**< Response code indicating that the issued command is not supported
* by the attached device.
*/
- SI_PIMA_RESPONSE_ParameterNotSupported = 6, /**< Response code indicating that one or more of the issued command's
+ PIMA_RESPONSE_ParameterNotSupported = 6, /**< Response code indicating that one or more of the issued command's
* parameters are not supported by the device.
*/
};
@@ -128,11 +128,11 @@
typedef struct
{
uint32_t DataLength; /**< Length of the container and data, in bytes. */
- uint16_t Type; /**< Container type, a value from the \ref SI_PIMA_Container_Types_t enum. */
+ uint16_t Type; /**< Container type, a value from the \ref PIMA_Container_Types_t enum. */
uint16_t Code; /**< Command, event or response code of the container. */
uint32_t TransactionID; /**< Unique container ID to link blocks together. */
uint32_t Params[3]; /**< Block parameters to be issued along with the block code (command blocks only). */
- } SI_PIMA_Container_t;
+ } PIMA_Container_t;
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.c b/LUFA/Drivers/USB/Class/Device/Audio.c
index 106a968dc..156a52140 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.c
+++ b/LUFA/Drivers/USB/Class/Device/Audio.c
@@ -33,6 +33,7 @@
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_AUDIO_DRIVER
+#define __INCLUDE_FROM_AUDIO_DEVICE_C
#include "Audio.h"
void Audio_Device_ProcessControlRequest(USB_ClassInfo_Audio_Device_t* const AudioInterfaceInfo)
diff --git a/LUFA/Drivers/USB/Class/Device/Audio.h b/LUFA/Drivers/USB/Class/Device/Audio.h
index 6520a3379..a20a7177e 100644
--- a/LUFA/Drivers/USB/Class/Device/Audio.h
+++ b/LUFA/Drivers/USB/Class/Device/Audio.h
@@ -33,8 +33,8 @@
*
* Device mode driver for the library USB Audio 1.0 Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/Audio.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassAudio
@@ -66,7 +66,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_AUDIO_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/Audio.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_AUDIO_DEVICE_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.c b/LUFA/Drivers/USB/Class/Device/CDC.c
index f95496ebd..2019ede0a 100644
--- a/LUFA/Drivers/USB/Class/Device/CDC.c
+++ b/LUFA/Drivers/USB/Class/Device/CDC.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
-#define __INCLUDE_FROM_CDC_CLASS_DEVICE_C
#define __INCLUDE_FROM_CDC_DRIVER
+#define __INCLUDE_FROM_CDC_DEVICE_C
#include "CDC.h"
void CDC_Device_Event_Stub(void)
diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h
index 2e66e9fa7..9d6db767f 100644
--- a/LUFA/Drivers/USB/Class/Device/CDC.h
+++ b/LUFA/Drivers/USB/Class/Device/CDC.h
@@ -33,8 +33,8 @@
*
* Device mode driver for the library USB CDC Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/CDC.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassCDC
@@ -84,7 +84,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_CDC_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/CDC.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_CDC_DEVICE_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
@@ -128,19 +132,10 @@
*/
} ControlLineStates; /**< Current states of the virtual serial port's control lines between the device and host. */
- struct
- {
- uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second. */
- uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the
- * \ref CDC_LineEncodingFormats_t enum.
- */
- uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the
- * \ref CDC_LineEncodingParity_t enum.
- */
- uint8_t DataBits; /**< Bits of data per character of the virtual serial port. */
- } LineEncoding; /** Line encoding used in the virtual serial port, for the device's information. This is generally
- * only used if the virtual serial port data is to be reconstructed on a physical UART.
- */
+ CDC_LineEncoding_t LineEncoding; /** Line encoding used in the virtual serial port, for the device's information.
+ * This is generally only used if the virtual serial port data is to be
+ * reconstructed on a physical UART.
+ */
} State; /**< State data for the USB class interface within the device. All elements in this section
* are reset to their defaults when the interface is enumerated.
*/
@@ -318,7 +313,7 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_CDC_CLASS_DEVICE_C)
+ #if defined(__INCLUDE_FROM_CDC_DEVICE_C)
static int CDC_Device_putchar(char c,
FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
static int CDC_Device_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
diff --git a/LUFA/Drivers/USB/Class/Device/HID.c b/LUFA/Drivers/USB/Class/Device/HID.c
index cdfe8497a..91a4f7a21 100644
--- a/LUFA/Drivers/USB/Class/Device/HID.c
+++ b/LUFA/Drivers/USB/Class/Device/HID.c
@@ -33,6 +33,7 @@
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_HID_DRIVER
+#define __INCLUDE_FROM_HID_DEVICE_C
#include "HID.h"
void HID_Device_ProcessControlRequest(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo)
diff --git a/LUFA/Drivers/USB/Class/Device/HID.h b/LUFA/Drivers/USB/Class/Device/HID.h
index 5329e294e..a7a931c7b 100644
--- a/LUFA/Drivers/USB/Class/Device/HID.h
+++ b/LUFA/Drivers/USB/Class/Device/HID.h
@@ -33,8 +33,8 @@
*
* Device mode driver for the library USB HID Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/HID.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassHID
@@ -66,9 +66,14 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_HID_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/HID.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
+ #if defined(__INCLUDE_FROM_HID_DEVICE_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
+ #endif
+
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** \brief HID Class Device Mode Configuration and State Structure.
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.c b/LUFA/Drivers/USB/Class/Device/MIDI.c
index 783b67ce7..f7c59b51e 100644
--- a/LUFA/Drivers/USB/Class/Device/MIDI.c
+++ b/LUFA/Drivers/USB/Class/Device/MIDI.c
@@ -33,6 +33,7 @@
#if defined(USB_CAN_BE_DEVICE)
#define __INCLUDE_FROM_MIDI_DRIVER
+#define __INCLUDE_FROM_MIDI_DEVICE_C
#include "MIDI.h"
bool MIDI_Device_ConfigureEndpoints(USB_ClassInfo_MIDI_Device_t* const MIDIInterfaceInfo)
diff --git a/LUFA/Drivers/USB/Class/Device/MIDI.h b/LUFA/Drivers/USB/Class/Device/MIDI.h
index 5af6e18a2..3f633acfc 100644
--- a/LUFA/Drivers/USB/Class/Device/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Device/MIDI.h
@@ -33,8 +33,8 @@
*
* Device mode driver for the library USB MIDI Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/MIDI.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassMIDI
@@ -66,7 +66,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_MIDI_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/MIDI.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_MIDI_DEVICE_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.c b/LUFA/Drivers/USB/Class/Device/MassStorage.c
index 039684437..f053a043e 100644
--- a/LUFA/Drivers/USB/Class/Device/MassStorage.c
+++ b/LUFA/Drivers/USB/Class/Device/MassStorage.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
-#define __INCLUDE_FROM_MS_CLASS_DEVICE_C
#define __INCLUDE_FROM_MS_DRIVER
+#define __INCLUDE_FROM_MASSSTORAGE_DEVICE_C
#include "MassStorage.h"
static volatile bool* CallbackIsResetSource;
diff --git a/LUFA/Drivers/USB/Class/Device/MassStorage.h b/LUFA/Drivers/USB/Class/Device/MassStorage.h
index 8201a3ce9..6611ca114 100644
--- a/LUFA/Drivers/USB/Class/Device/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Device/MassStorage.h
@@ -33,8 +33,8 @@
*
* Device mode driver for the library USB Mass Storage Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/MassStorage.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassMS
@@ -66,7 +66,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_MS_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/MassStorage.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_MASSSTORAGE_DEVICE_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
@@ -154,7 +158,7 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_MS_CLASS_DEVICE_C)
+ #if defined(__INCLUDE_FROM_MASSSTORAGE_DEVICE_C)
static void MS_Device_ReturnCommandStatus(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
static bool MS_Device_ReadInCommandBlock(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t StreamCallback_MS_Device_AbortOnMassStoreReset(void);
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.c b/LUFA/Drivers/USB/Class/Device/RNDIS.c
index 7b6719da6..d4ee38d58 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDIS.c
+++ b/LUFA/Drivers/USB/Class/Device/RNDIS.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_DEVICE)
-#define __INCLUDE_FROM_RNDIS_CLASS_DEVICE_C
#define __INCLUDE_FROM_RNDIS_DRIVER
+#define __INCLUDE_FROM_RNDIS_DEVICE_C
#include "RNDIS.h"
static const uint32_t PROGMEM AdapterSupportedOIDList[] =
diff --git a/LUFA/Drivers/USB/Class/Device/RNDIS.h b/LUFA/Drivers/USB/Class/Device/RNDIS.h
index 5aebcc63a..86d412137 100644
--- a/LUFA/Drivers/USB/Class/Device/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Device/RNDIS.h
@@ -33,8 +33,8 @@
*
* Device mode driver for the library USB RNDIS Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/RNDIS.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassRNDIS
@@ -66,9 +66,14 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_RNDIS_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/RNDIS.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
+ #if defined(__INCLUDE_FROM_RNDIS_DEVICE_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
+ #endif
+
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** \brief RNDIS Class Device Mode Configuration and State Structure.
@@ -151,7 +156,7 @@
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_RNDIS_CLASS_DEVICE_C)
+ #if defined(__INCLUDE_FROM_RNDIS_DEVICE_C)
static void RNDIS_Device_ProcessRNDISControlMessage(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo)
ATTR_NON_NULL_PTR_ARG(1);
static bool RNDIS_Device_ProcessNDISQuery(USB_ClassInfo_RNDIS_Device_t* const RNDISInterfaceInfo,
diff --git a/LUFA/Drivers/USB/Class/HID.h b/LUFA/Drivers/USB/Class/HID.h
index 3fb74f379..9c0a7ea33 100644
--- a/LUFA/Drivers/USB/Class/HID.h
+++ b/LUFA/Drivers/USB/Class/HID.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassHID HID Class Driver - LUFA/Drivers/Class/HID.h
+ * @defgroup Group_USBClassHID HID Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -61,16 +61,12 @@
#define _HID_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_HID_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_HID_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_DEVICE)
#include "Device/HID.h"
#endif
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.c b/LUFA/Drivers/USB/Class/Host/CDC.c
index 57ca35cdc..28d94e594 100644
--- a/LUFA/Drivers/USB/Class/Host/CDC.c
+++ b/LUFA/Drivers/USB/Class/Host/CDC.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_CDC_CLASS_HOST_C
#define __INCLUDE_FROM_CDC_DRIVER
+#define __INCLUDE_FROM_CDC_HOST_C
#include "CDC.h"
uint8_t CDC_Host_ConfigurePipes(USB_ClassInfo_CDC_Host_t* const CDCInterfaceInfo,
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.h b/LUFA/Drivers/USB/Class/Host/CDC.h
index 8a4b576ca..164e94f92 100644
--- a/LUFA/Drivers/USB/Class/Host/CDC.h
+++ b/LUFA/Drivers/USB/Class/Host/CDC.h
@@ -33,8 +33,8 @@
*
* Host mode driver for the library USB CDC Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/CDC.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassCDC
@@ -67,9 +67,13 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_CDC_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/CDC.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
+ #if defined(__INCLUDE_FROM_CDC_HOST_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
+ #endif
+
/* Public Interface - May be used in end-application: */
/* Type Defines: */
/** \brief CDC Class Host Mode Configuration and State Structure.
@@ -116,21 +120,12 @@
*/
} ControlLineStates; /**< Current states of the virtual serial port's control lines between the device and host. */
- struct
- {
- uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second. */
- uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the
- * \ref CDC_LineEncodingFormats_t enum.
- */
- uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the
- * \ref CDC_LineEncodingParity_t enum.
- */
- uint8_t DataBits; /**< Bits of data per character of the virtual serial port. */
- } LineEncoding; /**< Line encoding used in the virtual serial port, for the device's information. This is generally
- * only used if the virtual serial port data is to be reconstructed on a physical UART. When set
- * by the host application, the \ref CDC_Host_SetLineEncoding() function must be called to push
- * the changes to the device.
- */
+ CDC_LineEncoding_t LineEncoding; /**< Line encoding used in the virtual serial port, for the device's information.
+ * This is generally only used if the virtual serial port data is to be
+ * reconstructed on a physical UART. When set by the host application, the
+ * \ref CDC_Host_SetLineEncoding() function must be called to push the changes
+ * to the device.
+ */
} State; /**< State data for the USB class interface within the device. All elements in this section
* <b>may</b> be set to initial values, but may also be ignored to default to sane values when
* the interface is enumerated.
@@ -320,7 +315,7 @@
#define CDC_DATA_PROTOCOL 0x00
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_CDC_CLASS_HOST_C)
+ #if defined(__INCLUDE_FROM_CDC_HOST_C)
static int CDC_Host_putchar(char c,
FILE* Stream) ATTR_NON_NULL_PTR_ARG(2);
static int CDC_Host_getchar(FILE* Stream) ATTR_NON_NULL_PTR_ARG(1);
diff --git a/LUFA/Drivers/USB/Class/Host/HID.c b/LUFA/Drivers/USB/Class/Host/HID.c
index e5afca06c..c38766500 100644
--- a/LUFA/Drivers/USB/Class/Host/HID.c
+++ b/LUFA/Drivers/USB/Class/Host/HID.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_HID_CLASS_HOST_C
#define __INCLUDE_FROM_HID_DRIVER
+#define __INCLUDE_FROM_HID_HOST_C
#include "HID.h"
uint8_t HID_Host_ConfigurePipes(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo,
diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h
index 0ef3674d8..9c86e1240 100644
--- a/LUFA/Drivers/USB/Class/Host/HID.h
+++ b/LUFA/Drivers/USB/Class/Host/HID.h
@@ -33,8 +33,8 @@
*
* Host mode driver for the library USB HID Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/HID.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassHID
@@ -66,9 +66,14 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_HID_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/HID.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
#endif
+ #if defined(__INCLUDE_FROM_HID_HOST_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
+ #endif
+
+
/* Public Interface - May be used in end-application: */
/* Macros: */
/** Error code for some HID Host functions, indicating a logical (and not hardware) error. */
@@ -296,7 +301,7 @@
#define HID_INTERFACE_CLASS 0x03
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_HID_CLASS_HOST_C)
+ #if defined(__INCLUDE_FROM_HID_HOST_C)
static uint8_t DCOMP_HID_Host_NextHIDInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DCOMP_HID_Host_NextHID(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DCOMP_HID_Host_NextHIDInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.c b/LUFA/Drivers/USB/Class/Host/HIDParser.c
index 43f703a93..54416d66a 100644
--- a/LUFA/Drivers/USB/Class/Host/HIDParser.c
+++ b/LUFA/Drivers/USB/Class/Host/HIDParser.c
@@ -32,6 +32,7 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
+#define __INCLUDE_FROM_HID_DRIVER
#include "HIDParser.h"
uint8_t USB_ProcessHIDReport(const uint8_t* ReportData,
diff --git a/LUFA/Drivers/USB/Class/Host/HIDParser.h b/LUFA/Drivers/USB/Class/Host/HIDParser.h
index ba7346968..3d1ea5494 100644
--- a/LUFA/Drivers/USB/Class/Host/HIDParser.h
+++ b/LUFA/Drivers/USB/Class/Host/HIDParser.h
@@ -58,10 +58,6 @@
#ifndef __HIDPARSER_H__
#define __HIDPARSER_H__
- /* Macros: */
- #define __INCLUDE_FROM_USB_DRIVER
- #define __INCLUDE_FROM_HID_DRIVER
-
/* Includes: */
#include <string.h>
#include <stdbool.h>
diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.c b/LUFA/Drivers/USB/Class/Host/MIDI.c
index 99ae8a8ab..4483b5073 100644
--- a/LUFA/Drivers/USB/Class/Host/MIDI.c
+++ b/LUFA/Drivers/USB/Class/Host/MIDI.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_MIDI_CLASS_HOST_C
#define __INCLUDE_FROM_MIDI_DRIVER
+#define __INCLUDE_FROM_MIDI_HOST_C
#include "MIDI.h"
uint8_t MIDI_Host_ConfigurePipes(USB_ClassInfo_MIDI_Host_t* const MIDIInterfaceInfo,
diff --git a/LUFA/Drivers/USB/Class/Host/MIDI.h b/LUFA/Drivers/USB/Class/Host/MIDI.h
index e77487db4..34228121f 100644
--- a/LUFA/Drivers/USB/Class/Host/MIDI.h
+++ b/LUFA/Drivers/USB/Class/Host/MIDI.h
@@ -33,8 +33,8 @@
*
* Host mode driver for the library USB MIDI Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/MIDI.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassMIDI
@@ -64,7 +64,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_MIDI_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/MIDI.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_MIDI_HOST_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
@@ -190,7 +194,7 @@
#define MIDI_STREAMING_PROTOCOL 0x00
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_MIDI_CLASS_HOST_C)
+ #if defined(__INCLUDE_FROM_MIDI_HOST_C)
static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DCOMP_MIDI_Host_NextMIDIStreamingDataEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
#endif
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.c b/LUFA/Drivers/USB/Class/Host/MassStorage.c
index 26d096b4f..97b0aba4d 100644
--- a/LUFA/Drivers/USB/Class/Host/MassStorage.c
+++ b/LUFA/Drivers/USB/Class/Host/MassStorage.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_MS_CLASS_HOST_C
#define __INCLUDE_FROM_MS_DRIVER
+#define __INCLUDE_FROM_MASSSTORAGE_HOST_C
#include "MassStorage.h"
uint8_t MS_Host_ConfigurePipes(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
@@ -309,7 +309,7 @@ uint8_t MS_Host_ResetMSInterface(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo)
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
- .bRequest = REQ_MassStorageReset,
+ .bRequest = MS_REQ_MassStorageReset,
.wValue = 0,
.wIndex = MSInterfaceInfo->State.InterfaceNumber,
.wLength = 0,
@@ -328,7 +328,7 @@ uint8_t MS_Host_GetMaxLUN(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- .bRequest = REQ_GetMaxLUN,
+ .bRequest = MS_REQ_GetMaxLUN,
.wValue = 0,
.wIndex = MSInterfaceInfo->State.InterfaceNumber,
.wLength = 1,
diff --git a/LUFA/Drivers/USB/Class/Host/MassStorage.h b/LUFA/Drivers/USB/Class/Host/MassStorage.h
index f442db846..f375f3244 100644
--- a/LUFA/Drivers/USB/Class/Host/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/Host/MassStorage.h
@@ -33,8 +33,8 @@
*
* Host mode driver for the library USB Mass Storage Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/MassStorage.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassMS
@@ -64,7 +64,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_MS_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/MassStorage.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_MASSSTORAGE_HOST_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
@@ -313,9 +317,6 @@
#define MASS_STORE_SUBCLASS 0x06
#define MASS_STORE_PROTOCOL 0x50
- #define REQ_MassStorageReset 0xFF
- #define REQ_GetMaxLUN 0xFE
-
#define CBW_SIGNATURE 0x43425355UL
#define CSW_SIGNATURE 0x53425355UL
@@ -325,7 +326,7 @@
#define COMMAND_DATA_TIMEOUT_MS 10000
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_MS_CLASS_HOST_C)
+ #if defined(__INCLUDE_FROM_MASSSTORAGE_HOST_C)
static uint8_t DCOMP_MS_Host_NextMSInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DCOMP_MS_Host_NextMSInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.c b/LUFA/Drivers/USB/Class/Host/Printer.c
index 6cbd892dc..4249a8b70 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.c
+++ b/LUFA/Drivers/USB/Class/Host/Printer.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_PRINTER_CLASS_HOST_C
#define __INCLUDE_FROM_PRINTER_DRIVER
+#define __INCLUDE_FROM_PRINTER_HOST_C
#include "Printer.h"
uint8_t PRNT_Host_ConfigurePipes(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo,
@@ -175,7 +175,7 @@ uint8_t PRNT_Host_GetPortStatus(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceIn
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- .bRequest = REQ_GetPortStatus,
+ .bRequest = PRNT_REQ_GetPortStatus,
.wValue = 0,
.wIndex = PRNTInterfaceInfo->State.InterfaceNumber,
.wLength = sizeof(uint8_t),
@@ -191,7 +191,7 @@ uint8_t PRNT_Host_SoftReset(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo)
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_HOSTTODEVICE | REQTYPE_CLASS | REQREC_INTERFACE),
- .bRequest = REQ_SoftReset,
+ .bRequest = PRNT_REQ_SoftReset,
.wValue = 0,
.wIndex = PRNTInterfaceInfo->State.InterfaceNumber,
.wLength = 0,
@@ -345,7 +345,7 @@ uint8_t PRNT_Host_GetDeviceID(USB_ClassInfo_PRNT_Host_t* const PRNTInterfaceInfo
USB_ControlRequest = (USB_Request_Header_t)
{
.bmRequestType = (REQDIR_DEVICETOHOST | REQTYPE_CLASS | REQREC_INTERFACE),
- .bRequest = REQ_GetDeviceID,
+ .bRequest = PRNT_REQ_GetDeviceID,
.wValue = 0,
.wIndex = PRNTInterfaceInfo->State.InterfaceNumber,
.wLength = sizeof(DeviceIDStringLength),
diff --git a/LUFA/Drivers/USB/Class/Host/Printer.h b/LUFA/Drivers/USB/Class/Host/Printer.h
index 96ecd0fd6..962806e52 100644
--- a/LUFA/Drivers/USB/Class/Host/Printer.h
+++ b/LUFA/Drivers/USB/Class/Host/Printer.h
@@ -33,8 +33,8 @@
*
* Host mode driver for the library USB Printer Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/Printer.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassPrinter
@@ -64,7 +64,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_PRINTER_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/Printer.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_PRINTER_HOST_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
@@ -265,12 +269,8 @@
#define PRINTER_SUBCLASS 0x01
#define PRINTER_PROTOCOL 0x02
- #define REQ_GetDeviceID 0
- #define REQ_GetPortStatus 1
- #define REQ_SoftReset 2
-
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_PRINTER_CLASS_HOST_C)
+ #if defined(__INCLUDE_FROM_PRINTER_HOST_C)
static uint8_t DCOMP_PRNT_Host_NextPRNTInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DCOMP_PRNT_Host_NextPRNTInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
#endif
diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.c b/LUFA/Drivers/USB/Class/Host/RNDIS.c
index 541b7d3d1..ad242b258 100644
--- a/LUFA/Drivers/USB/Class/Host/RNDIS.c
+++ b/LUFA/Drivers/USB/Class/Host/RNDIS.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_RNDIS_CLASS_HOST_C
#define __INCLUDE_FROM_RNDIS_DRIVER
+#define __INCLUDE_FROM_RNDIS_HOST_C
#include "RNDIS.h"
uint8_t RNDIS_Host_ConfigurePipes(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
diff --git a/LUFA/Drivers/USB/Class/Host/RNDIS.h b/LUFA/Drivers/USB/Class/Host/RNDIS.h
index 5ff2e1b84..2c2aad8df 100644
--- a/LUFA/Drivers/USB/Class/Host/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/Host/RNDIS.h
@@ -33,8 +33,8 @@
*
* Host mode driver for the library USB RNDIS Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/RNDIS.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassRNDIS
@@ -68,7 +68,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_RNDIS_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/RNDIS.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_RNDIS_HOST_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
@@ -267,7 +271,7 @@
#define RNDIS_DATA_PROTOCOL 0x00
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_RNDIS_CLASS_HOST_C)
+ #if defined(__INCLUDE_FROM_RNDIS_HOST_C)
static uint8_t RNDIS_SendEncapsulatedCommand(USB_ClassInfo_RNDIS_Host_t* const RNDISInterfaceInfo,
void* Buffer,
const uint16_t Length) ATTR_NON_NULL_PTR_ARG(1)
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.c b/LUFA/Drivers/USB/Class/Host/StillImage.c
index f7f8637a2..25c5f20b0 100644
--- a/LUFA/Drivers/USB/Class/Host/StillImage.c
+++ b/LUFA/Drivers/USB/Class/Host/StillImage.c
@@ -32,8 +32,8 @@
#include "../../HighLevel/USBMode.h"
#if defined(USB_CAN_BE_HOST)
-#define __INCLUDE_FROM_SI_CLASS_HOST_C
#define __INCLUDE_FROM_SI_DRIVER
+#define __INCLUDE_FROM_STILLIMAGE_HOST_C
#include "StillImage.h"
uint8_t SI_Host_ConfigurePipes(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
@@ -163,7 +163,7 @@ uint8_t DCOMP_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor)
}
uint8_t SI_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
- SI_PIMA_Container_t* const PIMAHeader)
+ PIMA_Container_t* const PIMAHeader)
{
uint8_t ErrorCode;
@@ -194,7 +194,7 @@ uint8_t SI_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
}
uint8_t SI_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
- SI_PIMA_Container_t* const PIMAHeader)
+ PIMA_Container_t* const PIMAHeader)
{
uint16_t TimeoutMSRem = COMMAND_DATA_TIMEOUT_MS;
uint16_t PreviousFrameNumber = USB_Host_GetFrameNumber();
@@ -243,7 +243,7 @@ uint8_t SI_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInf
Pipe_Read_Stream_LE(PIMAHeader, PIMA_COMMAND_SIZE(0), NO_STREAM_CALLBACK);
- if (PIMAHeader->Type == SI_PIMA_CONTAINER_ResponseBlock)
+ if (PIMAHeader->Type == PIMA_CONTAINER_ResponseBlock)
{
uint8_t ParamBytes = (PIMAHeader->DataLength - PIMA_COMMAND_SIZE(0));
@@ -316,7 +316,7 @@ bool SI_Host_IsEventReceived(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
}
uint8_t SI_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
- SI_PIMA_Container_t* const PIMAHeader)
+ PIMA_Container_t* const PIMAHeader)
{
uint8_t ErrorCode;
@@ -326,7 +326,7 @@ uint8_t SI_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInf
Pipe_SelectPipe(SIInterfaceInfo->Config.EventsPipeNumber);
Pipe_Unfreeze();
- ErrorCode = Pipe_Read_Stream_LE(PIMAHeader, sizeof(SI_PIMA_Container_t), NO_STREAM_CALLBACK);
+ ErrorCode = Pipe_Read_Stream_LE(PIMAHeader, sizeof(PIMA_Container_t), NO_STREAM_CALLBACK);
Pipe_ClearIN();
Pipe_Freeze();
@@ -344,10 +344,10 @@ uint8_t SI_Host_OpenSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
SIInterfaceInfo->State.TransactionID = 0;
SIInterfaceInfo->State.IsSessionOpen = false;
- SI_PIMA_Container_t PIMABlock = (SI_PIMA_Container_t)
+ PIMA_Container_t PIMABlock = (PIMA_Container_t)
{
.DataLength = PIMA_COMMAND_SIZE(1),
- .Type = SI_PIMA_CONTAINER_CommandBlock,
+ .Type = PIMA_CONTAINER_CommandBlock,
.Code = 0x1002,
.Params = {1},
};
@@ -358,7 +358,7 @@ uint8_t SI_Host_OpenSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
if ((ErrorCode = SI_Host_ReceiveBlockHeader(SIInterfaceInfo, &PIMABlock)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
- if ((PIMABlock.Type != SI_PIMA_CONTAINER_ResponseBlock) || (PIMABlock.Code != 0x2001))
+ if ((PIMABlock.Type != PIMA_CONTAINER_ResponseBlock) || (PIMABlock.Code != 0x2001))
return SI_ERROR_LOGICAL_CMD_FAILED;
SIInterfaceInfo->State.IsSessionOpen = true;
@@ -373,10 +373,10 @@ uint8_t SI_Host_CloseSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
uint8_t ErrorCode;
- SI_PIMA_Container_t PIMABlock = (SI_PIMA_Container_t)
+ PIMA_Container_t PIMABlock = (PIMA_Container_t)
{
.DataLength = PIMA_COMMAND_SIZE(1),
- .Type = SI_PIMA_CONTAINER_CommandBlock,
+ .Type = PIMA_CONTAINER_CommandBlock,
.Code = 0x1003,
.Params = {1},
};
@@ -389,7 +389,7 @@ uint8_t SI_Host_CloseSession(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
SIInterfaceInfo->State.IsSessionOpen = false;
- if ((PIMABlock.Type != SI_PIMA_CONTAINER_ResponseBlock) || (PIMABlock.Code != 0x2001))
+ if ((PIMABlock.Type != PIMA_CONTAINER_ResponseBlock) || (PIMABlock.Code != 0x2001))
return SI_ERROR_LOGICAL_CMD_FAILED;
return PIPE_RWSTREAM_NoError;
@@ -405,10 +405,10 @@ uint8_t SI_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
uint8_t ErrorCode;
- SI_PIMA_Container_t PIMABlock = (SI_PIMA_Container_t)
+ PIMA_Container_t PIMABlock = (PIMA_Container_t)
{
.DataLength = PIMA_COMMAND_SIZE(TotalParams),
- .Type = SI_PIMA_CONTAINER_CommandBlock,
+ .Type = PIMA_CONTAINER_CommandBlock,
.Code = Operation,
};
@@ -423,7 +423,7 @@ uint8_t SI_Host_SendCommand(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
uint8_t SI_Host_ReceiveResponse(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
{
uint8_t ErrorCode;
- SI_PIMA_Container_t PIMABlock;
+ PIMA_Container_t PIMABlock;
if ((USB_HostState != HOST_STATE_Configured) || !(SIInterfaceInfo->State.IsActive))
return HOST_SENDCONTROL_DeviceDisconnected;
@@ -431,7 +431,7 @@ uint8_t SI_Host_ReceiveResponse(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo)
if ((ErrorCode = SI_Host_ReceiveBlockHeader(SIInterfaceInfo, &PIMABlock)) != PIPE_RWSTREAM_NoError)
return ErrorCode;
- if ((PIMABlock.Type != SI_PIMA_CONTAINER_ResponseBlock) || (PIMABlock.Code != 0x2001))
+ if ((PIMABlock.Type != PIMA_CONTAINER_ResponseBlock) || (PIMABlock.Code != 0x2001))
return SI_ERROR_LOGICAL_CMD_FAILED;
return PIPE_RWSTREAM_NoError;
diff --git a/LUFA/Drivers/USB/Class/Host/StillImage.h b/LUFA/Drivers/USB/Class/Host/StillImage.h
index d2e6fe0d2..07c6546c2 100644
--- a/LUFA/Drivers/USB/Class/Host/StillImage.h
+++ b/LUFA/Drivers/USB/Class/Host/StillImage.h
@@ -33,8 +33,8 @@
*
* Host mode driver for the library USB Still Image Class driver.
*
- * \note This file should not be included directly. It is automatically included as needed by the class driver
- * dispatch header located in LUFA/Drivers/USB/Class/StillImage.h.
+ * \note This file should not be included directly. It is automatically included as needed by the USB module driver
+ * dispatch header located in LUFA/Drivers/USB.h.
*/
/** \ingroup Group_USBClassSI
@@ -64,7 +64,11 @@
/* Preprocessor Checks: */
#if !defined(__INCLUDE_FROM_SI_DRIVER)
- #error Do not include this file directly. Include LUFA/Drivers/Class/StillImage.h instead.
+ #error Do not include this file directly. Include LUFA/Drivers/USB.h instead.
+ #endif
+
+ #if defined(__INCLUDE_FROM_STILLIMAGE_HOST_C) && defined(NO_STREAM_CALLBACKS)
+ #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
#endif
/* Public Interface - May be used in end-application: */
@@ -184,7 +188,7 @@
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
uint8_t SI_Host_SendBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
- SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
+ PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
ATTR_NON_NULL_PTR_ARG(2);
/** Receives a raw PIMA block header to the device. This can be used to receive arbitrary PIMA blocks from the device with
@@ -199,7 +203,7 @@
* \return A value from the \ref Pipe_Stream_RW_ErrorCodes_t enum.
*/
uint8_t SI_Host_ReceiveBlockHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
- SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
+ PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
ATTR_NON_NULL_PTR_ARG(2);
/** Sends a given PIMA command to the attached device, filling out the PIMA command header's Transaction ID automatically.
@@ -256,7 +260,7 @@
* returned a logical command failure.
*/
uint8_t SI_Host_ReceiveEventHeader(USB_ClassInfo_SI_Host_t* const SIInterfaceInfo,
- SI_PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
+ PIMA_Container_t* const PIMAHeader) ATTR_NON_NULL_PTR_ARG(1)
ATTR_NON_NULL_PTR_ARG(2);
/** Sends arbitrary data to the attached device, for use in the data phase of PIMA commands which require data
@@ -314,7 +318,7 @@
#define COMMAND_DATA_TIMEOUT_MS 10000
/* Function Prototypes: */
- #if defined(__INCLUDE_FROM_SI_CLASS_HOST_C)
+ #if defined(__INCLUDE_FROM_STILLIMAGE_HOST_C)
static uint8_t DCOMP_SI_Host_NextSIInterface(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
static uint8_t DCOMP_SI_Host_NextSIInterfaceEndpoint(void* const CurrentDescriptor) ATTR_NON_NULL_PTR_ARG(1);
#endif
diff --git a/LUFA/Drivers/USB/Class/MIDI.h b/LUFA/Drivers/USB/Class/MIDI.h
index c7de15cfc..6427683b4 100644
--- a/LUFA/Drivers/USB/Class/MIDI.h
+++ b/LUFA/Drivers/USB/Class/MIDI.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassMIDI MIDI Class Driver - LUFA/Drivers/Class/MIDI.h
+ * @defgroup Group_USBClassMIDI MIDI Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -63,16 +63,12 @@
#define _MIDI_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_MIDI_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_MIDI_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_DEVICE)
#include "Device/MIDI.h"
#endif
diff --git a/LUFA/Drivers/USB/Class/MassStorage.h b/LUFA/Drivers/USB/Class/MassStorage.h
index 985300f00..666025341 100644
--- a/LUFA/Drivers/USB/Class/MassStorage.h
+++ b/LUFA/Drivers/USB/Class/MassStorage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassMS Mass Storage Class Driver - LUFA/Drivers/Class/MassStorage.h
+ * @defgroup Group_USBClassMS Mass Storage Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -60,16 +60,12 @@
#define _MS_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_MS_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_MS_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_DEVICE)
#include "Device/MassStorage.h"
#endif
diff --git a/LUFA/Drivers/USB/Class/Printer.h b/LUFA/Drivers/USB/Class/Printer.h
index 9bd3b5257..ebd525af1 100644
--- a/LUFA/Drivers/USB/Class/Printer.h
+++ b/LUFA/Drivers/USB/Class/Printer.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassPrinter Printer Class Driver - LUFA/Drivers/Class/Printer.h
+ * @defgroup Group_USBClassPrinter Printer Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -61,16 +61,12 @@
#define _PRINTER_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_PRINTER_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_PRINTER_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_HOST)
#include "Host/Printer.h"
#endif
diff --git a/LUFA/Drivers/USB/Class/RNDIS.h b/LUFA/Drivers/USB/Class/RNDIS.h
index 1b0381e8c..228fbf9a4 100644
--- a/LUFA/Drivers/USB/Class/RNDIS.h
+++ b/LUFA/Drivers/USB/Class/RNDIS.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassRNDIS RNDIS (Networking) Class Driver - LUFA/Drivers/Class/RNDIS.h
+ * @defgroup Group_USBClassRNDIS RNDIS (Networking) Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -60,16 +60,12 @@
#define _RNDIS_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_RNDIS_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_RNDIS_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_DEVICE)
#include "Device/RNDIS.h"
#endif
diff --git a/LUFA/Drivers/USB/Class/StillImage.h b/LUFA/Drivers/USB/Class/StillImage.h
index 85a2eef48..ff60d075c 100644
--- a/LUFA/Drivers/USB/Class/StillImage.h
+++ b/LUFA/Drivers/USB/Class/StillImage.h
@@ -38,7 +38,7 @@
*/
/** \ingroup Group_USBClassDrivers
- * @defgroup Group_USBClassSI Still Image Class Driver - LUFA/Drivers/Class/StillImage.h
+ * @defgroup Group_USBClassSI Still Image Class Driver
*
* \section Sec_Dependencies Module Source Dependencies
* The following files must be built with any user project that uses this module:
@@ -59,16 +59,12 @@
#define _SI_CLASS_H_
/* Macros: */
- #define __INCLUDE_FROM_SI_DRIVER
#define __INCLUDE_FROM_USB_DRIVER
+ #define __INCLUDE_FROM_SI_DRIVER
/* Includes: */
#include "../HighLevel/USBMode.h"
- #if defined(NO_STREAM_CALLBACKS)
- #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.
- #endif
-
#if defined(USB_CAN_BE_HOST)
#include "Host/StillImage.h"
#endif
diff --git a/LUFA/Drivers/USB/USB.h b/LUFA/Drivers/USB/USB.h
index b8dce821e..bae0450eb 100644
--- a/LUFA/Drivers/USB/USB.h
+++ b/LUFA/Drivers/USB/USB.h
@@ -394,6 +394,15 @@
#if defined(USB_CAN_BE_BOTH) || defined(__DOXYGEN__)
#include "LowLevel/OTG.h"
#endif
+
+ #include "Class/Audio.h"
+ #include "Class/CDC.h"
+ #include "Class/HID.h"
+ #include "Class/MassStorage.h"
+ #include "Class/MIDI.h"
+ #include "Class/Printer.h"
+ #include "Class/RNDIS.h"
+ #include "Class/StillImage.h"
#endif
diff --git a/LUFA/ManPages/ChangeLog.txt b/LUFA/ManPages/ChangeLog.txt
index 0dbdde5d9..f31902c33 100644
--- a/LUFA/ManPages/ChangeLog.txt
+++ b/LUFA/ManPages/ChangeLog.txt
@@ -54,6 +54,9 @@
* - Moved the USB mode specifier constants into a new enum, so that they are semantically related to one another
* - Renamed ENDPOINT_DOUBLEBANK_SUPPORTED() to ENDPOINT_BANKS_SUPPORTED() and changed it to return the maximum number of supported banks for
* the given endpoint
+ * - Better algorithm to extract and convert the internal device serial number into a string descriptor (if present)
+ * - All USB class drivers are now automatically included when LUFA/Drivers/USB.h is included, and no longer need to be seperately included
+ * - All LowLevel demos changed to use the constants and types defined in the USB class drivers
*
* <b>Fixed:</b>
* - Fixed USB_GetHIDReportItemInfo() function modifying the given report item's data when the report item does not exist
diff --git a/LUFA/ManPages/MigrationInformation.txt b/LUFA/ManPages/MigrationInformation.txt
index 0ab6a6f0f..004d9a078 100644
--- a/LUFA/ManPages/MigrationInformation.txt
+++ b/LUFA/ManPages/MigrationInformation.txt
@@ -21,6 +21,9 @@
* specified, the controller will default to UID selection mode.
* - The USB mode specifier constants have been moved into a new enum and renamed. Existing projects should use the equivalent
* value in the new \ref USB_Modes_t enum.
+ * - All class driver headers are now included as part of the standard LUFA/Drivers/USB/USB.h master dispatch header, and should
+ * no longer be included seperately. Class driver module source files must still be added as a seperate module in the project's
+ * makefile if used.
*
* <b>Device Mode</b>
* - Endpoints MUST be allocated in ascending order to ensure that bank corruption does not occur. Ensure that your user application