Make Low Level host demos use void pointers for the configuration descriptor, to...
authorDean Camera <dean@fourwalledcubicle.com>
Sat, 7 Nov 2009 07:23:03 +0000 (07:23 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sat, 7 Nov 2009 07:23:03 +0000 (07:23 +0000)
Added preprocessor checks to give a human readable error when the class drivers are used when the incompatible NO_STREAM_CALLBACKS compile time option is used.

22 files changed:
Demos/Host/Incomplete/BluetoothHost/ConfigDescriptor.c
Demos/Host/LowLevel/CDCHost/ConfigDescriptor.c
Demos/Host/LowLevel/GenericHIDHost/ConfigDescriptor.c
Demos/Host/LowLevel/JoystickHostWithParser/ConfigDescriptor.c
Demos/Host/LowLevel/KeyboardHost/ConfigDescriptor.c
Demos/Host/LowLevel/KeyboardHostWithParser/ConfigDescriptor.c
Demos/Host/LowLevel/MIDIHost/ConfigDescriptor.c
Demos/Host/LowLevel/MassStorageHost/ConfigDescriptor.c
Demos/Host/LowLevel/MouseHost/ConfigDescriptor.c
Demos/Host/LowLevel/MouseHostWithParser/ConfigDescriptor.c
Demos/Host/LowLevel/PrinterHost/ConfigDescriptor.c
Demos/Host/LowLevel/StillImageHost/ConfigDescriptor.c
LUFA/Drivers/USB/Class/Audio.h
LUFA/Drivers/USB/Class/CDC.h
LUFA/Drivers/USB/Class/HID.h
LUFA/Drivers/USB/Class/MIDI.h
LUFA/Drivers/USB/Class/MassStorage.h
LUFA/Drivers/USB/Class/Printer.h
LUFA/Drivers/USB/Class/RNDIS.h
LUFA/Drivers/USB/Class/StillImage.h
LUFA/ManPages/WhyUseLUFA.txt
Projects/MissileLauncher/ConfigDescriptor.c

index 487cac6..849b1f9 100644 (file)
@@ -33,7 +33,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints = 0;\r
 \r
index a3e6b77..d0fc994 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints = 0;\r
 \r
index b035862..f6a1249 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints = 0;\r
 \r
index 9d4b201..758db8d 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
 \r
        /* Retrieve the entire configuration descriptor into the allocated buffer */\r
index 03ee2cd..0bca255 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
 \r
        /* Retrieve the entire configuration descriptor into the allocated buffer */\r
index e587a75..01fb09e 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
 \r
        /* Retrieve the entire configuration descriptor into the allocated buffer */\r
index 655e779..631b15f 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints = 0;\r
 \r
index a18d7ce..bbe1464 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints     = 0;\r
 \r
index ee260ab..c9aaf87 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
 \r
        /* Retrieve the entire configuration descriptor into the allocated buffer */\r
index 3c05118..908aecd 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
 \r
        /* Retrieve the entire configuration descriptor into the allocated buffer */\r
index 9ee5ec6..8a40e35 100644 (file)
@@ -47,7 +47,7 @@ uint8_t PrinterAltSetting;
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints = 0;\r
 \r
index 5cee61b..9b77762 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints = 0;\r
 \r
index c429b33..e517f3b 100644 (file)
 \r
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
+               \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
 \r
                #if defined(USB_CAN_BE_DEVICE)\r
                        #include "Device/Audio.h"\r
index 8ed0cf6..3d40dff 100644 (file)
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
 \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
+\r
                #if defined(USB_CAN_BE_DEVICE)\r
                        #include "Device/CDC.h"\r
                #endif\r
index f1e2367..f5f9575 100644 (file)
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
 \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
+\r
                #if defined(USB_CAN_BE_DEVICE)\r
                        #include "Device/HID.h"\r
                #endif\r
index a38c3d8..96b23ef 100644 (file)
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
 \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
+\r
                #if defined(USB_CAN_BE_DEVICE)\r
                        #include "Device/MIDI.h"\r
                #endif\r
index d2ad7dc..962b4d6 100644 (file)
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
 \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
+\r
                #if defined(USB_CAN_BE_DEVICE)\r
                        #include "Device/MassStorage.h"\r
                #endif\r
index b1d41fc..2f0285b 100644 (file)
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
                \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
+\r
                #if defined(USB_CAN_BE_HOST)\r
                        #include "Host/Printer.h"\r
                #endif\r
index 87616ae..7b250a4 100644 (file)
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
 \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
+\r
                #if defined(USB_CAN_BE_DEVICE)\r
                        #include "Device/RNDIS.h"\r
                #endif\r
index 273b97a..794d612 100644 (file)
        /* Includes: */\r
                #include "../HighLevel/USBMode.h"\r
                \r
+               #if defined(NO_STREAM_CALLBACKS)\r
+                       #error The NO_STREAM_CALLBACKS compile time option cannot be used in projects using the library Class drivers.\r
+               #endif\r
+\r
                #if defined(USB_CAN_BE_HOST)\r
                        #include "Host/StillImage.h"\r
                #endif\r
index 17483d6..b967e87 100644 (file)
  *    it directly. Updating the LUFA library is a simple folder-replacement and gives new features and bug fixes in\r
  *    seconds each time a new release is made.\r
  *\r
+ *  - <b>Size:</b>\r
+ *    Not just requiring less code to make complex USB devices, LUFA (under most cases with the correct compile options)\r
+ *    requires less FLASH space than Atmel's stack, meaning more space for the user application*.\r
+ *\r
  *  - <b>Support:</b>\r
  *    Since many people are now using LUFA in their own projects, you can take advantage of other's knowedge when you run\r
  *    into difficulties or need some advice. In addition, you can also email the library author to recieve personalised\r
  *    support when you need it (subject to author's schedule).\r
+ *\r
+ *   <small>* Atmel Mouse Device Demo 4292 bytes, LUFA Mouse Low Level Device Demo 3336 bytes, under identical build\r
+ *   environments</small>\r
  */\r
  
\ No newline at end of file
index 0a50beb..0ebf95a 100644 (file)
@@ -48,7 +48,7 @@
 uint8_t ProcessConfigurationDescriptor(void)\r
 {\r
        uint8_t  ConfigDescriptorData[512];\r
-       uint8_t* CurrConfigLocation = ConfigDescriptorData;\r
+       void*    CurrConfigLocation = ConfigDescriptorData;\r
        uint16_t CurrConfigBytesRem;\r
        uint8_t  FoundEndpoints = 0;\r
 \r