Use puts_P() and printf_P() instead of the normal variants where possible in the...
authorDean Camera <dean@fourwalledcubicle.com>
Wed, 28 Apr 2010 14:33:10 +0000 (14:33 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Wed, 28 Apr 2010 14:33:10 +0000 (14:33 +0000)
19 files changed:
Bootloaders/makefile
Demos/Device/makefile
Demos/Host/ClassDriver/JoystickHostWithParser/JoystickHostWithParser.c
Demos/Host/ClassDriver/KeyboardHost/KeyboardHost.c
Demos/Host/ClassDriver/KeyboardHostWithParser/KeyboardHostWithParser.c
Demos/Host/ClassDriver/MIDIHost/MIDIHost.c
Demos/Host/ClassDriver/MassStorageHost/MassStorageHost.c
Demos/Host/ClassDriver/MouseHost/MouseHost.c
Demos/Host/ClassDriver/MouseHostWithParser/MouseHostWithParser.c
Demos/Host/ClassDriver/PrinterHost/PrinterHost.c
Demos/Host/ClassDriver/RNDISEthernetHost/RNDISEthernetHost.c
Demos/Host/ClassDriver/StillImageHost/StillImageHost.c
Demos/Host/ClassDriver/VirtualSerialHost/VirtualSerialHost.c
Demos/Host/makefile
Demos/makefile
LUFA/Common/Common.h
LUFA/Drivers/USB/Class/Host/MassStorage.c
LUFA/ManPages/ChangeLog.txt
makefile

index 80017d6..5866342 100644 (file)
 # code.\r
 \r
 all:\r
-       make -C 'DFU/' clean\r
-       make -C 'DFU/' all\r
+       make -C DFU clean\r
+       make -C DFU all\r
 \r
-       make -C 'CDC/' clean\r
-       make -C 'CDC/' all\r
+       make -C CDC clean\r
+       make -C CDC all\r
        \r
-       make -C 'TeensyHID/' clean\r
-       make -C 'TeensyHID/' all\r
+       make -C TeensyHID clean\r
+       make -C TeensyHID all\r
 \r
 %:\r
-       make -C 'DFU/' $@\r
-       make -C 'CDC/' $@\r
-       make -C 'TeensyHID/' $@\r
+       make -C DFU $@\r
+       make -C CDC $@\r
+       make -C TeensyHID $@\r
index 6a0c0ef..7d2b91d 100644 (file)
@@ -14,5 +14,5 @@
 # code.
 
 %:
-       make -C ClassDriver/ $@
-       make -C LowLevel/ $@
+       make -C ClassDriver $@
+       make -C LowLevel $@
index 32c9b69..7be38dd 100644 (file)
@@ -85,7 +85,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -94,7 +94,7 @@ int main(void)
                                if (HID_Host_ConfigurePipes(&Joystick_HID_Interface,\r
                                                            ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Joystick.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Joystick.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -102,7 +102,7 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -110,13 +110,13 @@ int main(void)
 \r
                                if (HID_Host_SetReportProtocol(&Joystick_HID_Interface) != 0)\r
                                {\r
-                                       printf("Error Setting Report Protocol Mode or Not a Valid Joystick.\r\n");\r
+                                       puts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Joystick.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Joystick Enumerated.\r\n");\r
+                               puts_P(PSTR("Joystick Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
index 61292a4..c79c100 100644 (file)
@@ -80,7 +80,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -89,7 +89,7 @@ int main(void)
                                if (HID_Host_ConfigurePipes(&Keyboard_HID_Interface,\r
                                                            ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Keyboard.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Keyboard.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -97,7 +97,7 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -105,13 +105,13 @@ int main(void)
 \r
                                if (HID_Host_SetBootProtocol(&Keyboard_HID_Interface) != 0)\r
                                {\r
-                                       printf("Could not Set Boot Protocol Mode.\r\n");\r
+                                       puts_P(PSTR("Could not Set Boot Protocol Mode.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Keyboard Enumerated.\r\n");\r
+                               puts_P(PSTR("Keyboard Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
index 531757a..91ca844 100644 (file)
@@ -85,7 +85,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -94,7 +94,7 @@ int main(void)
                                if (HID_Host_ConfigurePipes(&Keyboard_HID_Interface,\r
                                                            ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Keyboard.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Keyboard.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -102,7 +102,7 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -110,13 +110,13 @@ int main(void)
 \r
                                if (HID_Host_SetReportProtocol(&Keyboard_HID_Interface) != 0)\r
                                {\r
-                                       printf("Error Setting Report Protocol Mode or Not a Valid Keyboard.\r\n");\r
+                                       puts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Keyboard.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Keyboard Enumerated.\r\n");\r
+                               puts_P(PSTR("Keyboard Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
index 8fbf31b..6f30fa3 100644 (file)
@@ -78,7 +78,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -87,7 +87,7 @@ int main(void)
                                if (MIDI_Host_ConfigurePipes(&Keyboard_MIDI_Interface,\r
                                                             ConfigDescriptorSize, ConfigDescriptorData) != MIDI_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid MIDI Class Device.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid MIDI Class Device.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -95,13 +95,13 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("MIDI Device Enumerated.\r\n");\r
+                               puts_P(PSTR("MIDI Device Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
index a442c1b..8b012b4 100644 (file)
@@ -78,7 +78,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -87,7 +87,7 @@ int main(void)
                                if (MS_Host_ConfigurePipes(&FlashDisk_MS_Interface,\r
                                                           ConfigDescriptorSize, ConfigDescriptorData) != MS_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Mass Storage Device.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Mass Storage Device.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -95,13 +95,13 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Mass Storage Device Enumerated.\r\n");\r
+                               puts_P(PSTR("Mass Storage Device Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
@@ -111,17 +111,17 @@ int main(void)
                                uint8_t MaxLUNIndex;\r
                                if (MS_Host_GetMaxLUN(&FlashDisk_MS_Interface, &MaxLUNIndex))\r
                                {\r
-                                       printf("Error retrieving max LUN index.\r\n");\r
+                                       puts_P(PSTR("Error retrieving max LUN index.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Total LUNs: %d - Using first LUN in device.\r\n", (MaxLUNIndex + 1));\r
+                               printf_P(PSTR("Total LUNs: %d - Using first LUN in device.\r\n"), (MaxLUNIndex + 1));\r
                                \r
                                if (MS_Host_ResetMSInterface(&FlashDisk_MS_Interface))\r
                                {\r
-                                       printf("Error resetting Mass Storage interface.\r\n");\r
+                                       puts_P(PSTR("Error resetting Mass Storage interface.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -130,7 +130,7 @@ int main(void)
                                SCSI_Request_Sense_Response_t SenseData;\r
                                if (MS_Host_RequestSense(&FlashDisk_MS_Interface, 0, &SenseData) != 0)\r
                                {\r
-                                       printf("Error retrieving device sense.\r\n");\r
+                                       puts_P(PSTR("Error retrieving device sense.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -138,7 +138,7 @@ int main(void)
                        \r
                                if (MS_Host_PreventAllowMediumRemoval(&FlashDisk_MS_Interface, 0, true))\r
                                {\r
-                                       printf("Error setting Prevent Device Removal bit.\r\n");\r
+                                       puts_P(PSTR("Error setting Prevent Device Removal bit.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -147,15 +147,15 @@ int main(void)
                                SCSI_Inquiry_Response_t InquiryData;\r
                                if (MS_Host_GetInquiryData(&FlashDisk_MS_Interface, 0, &InquiryData))\r
                                {\r
-                                       printf("Error retrieving device Inquiry data.\r\n");\r
+                                       puts_P(PSTR("Error retrieving device Inquiry data.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;                          \r
                                }\r
 \r
-                               printf("Vendor \"%.8s\", Product \"%.16s\"\r\n", InquiryData.VendorID, InquiryData.ProductID);\r
+                               printf_P(PSTR("Vendor \"%.8s\", Product \"%.16s\"\r\n"), InquiryData.VendorID, InquiryData.ProductID);\r
                                \r
-                               printf("Waiting until ready...\r\n");\r
+                               puts_P(PSTR("Waiting until ready...\r\n"));\r
 \r
                                for (;;)\r
                                {\r
@@ -167,37 +167,37 @@ int main(void)
                                        /* Check if an error other than a logical command error (device busy) received */\r
                                        if (ErrorCode != MS_ERROR_LOGICAL_CMD_FAILED)\r
                                        {\r
-                                               printf("Error waiting for device to be ready.\r\n");\r
+                                               puts_P(PSTR("Error waiting for device to be ready.\r\n"));\r
                                                LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                                USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                                break;\r
                                        }\r
                                }\r
 \r
-                               printf("Retrieving Capacity... ");\r
+                               puts_P(PSTR("Retrieving Capacity...\r\n"));\r
 \r
                                SCSI_Capacity_t DiskCapacity;\r
                                if (MS_Host_ReadDeviceCapacity(&FlashDisk_MS_Interface, 0, &DiskCapacity))\r
                                {\r
-                                       printf("Error retrieving device capacity.\r\n");\r
+                                       puts_P(PSTR("Error retrieving device capacity.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("%lu blocks of %lu bytes.\r\n", DiskCapacity.Blocks, DiskCapacity.BlockSize);\r
+                               printf_P(PSTR("%lu blocks of %lu bytes.\r\n"), DiskCapacity.Blocks, DiskCapacity.BlockSize);\r
 \r
                                uint8_t BlockBuffer[DiskCapacity.BlockSize];\r
 \r
                                if (MS_Host_ReadDeviceBlocks(&FlashDisk_MS_Interface, 0, 0x00000000, 1, DiskCapacity.BlockSize, BlockBuffer))\r
                                {\r
-                                       printf("Error reading device block.\r\n");\r
+                                       puts_P(PSTR("Error reading device block.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                        \r
-                               printf("\r\nContents of first block:\r\n");\r
+                               puts_P(PSTR("\r\nContents of first block:"));\r
 \r
                                for (uint16_t Chunk = 0; Chunk < (DiskCapacity.BlockSize >> 4); Chunk++)\r
                                {\r
@@ -210,7 +210,7 @@ int main(void)
                                                printf_P(PSTR("%.2X "), CurrByte);\r
                                        }\r
                                        \r
-                                       printf("    ");\r
+                                       printf_P(PSTR("    "));\r
 \r
                                        /* Print out the 16 bytes of the chunk in ASCII format */\r
                                        for (uint8_t ByteOffset = 0; ByteOffset < (1 << 4); ByteOffset++)\r
@@ -219,7 +219,7 @@ int main(void)
                                                putchar(isprint(CurrByte) ? CurrByte : '.');\r
                                        }\r
                                        \r
-                                       printf("\r\n");\r
+                                       printf_P(PSTR("\r\n"));\r
                                }\r
 \r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
index af75d4b..2c42e64 100644 (file)
@@ -80,7 +80,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -89,7 +89,7 @@ int main(void)
                                if (HID_Host_ConfigurePipes(&Mouse_HID_Interface,\r
                                                            ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Mouse.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Mouse.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -97,7 +97,7 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -105,13 +105,13 @@ int main(void)
 \r
                                if (HID_Host_SetBootProtocol(&Mouse_HID_Interface) != 0)\r
                                {\r
-                                       printf("Could not Set Boot Protocol Mode.\r\n");\r
+                                       puts_P(PSTR("Could not Set Boot Protocol Mode.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Mouse Enumerated.\r\n");\r
+                               puts_P(PSTR("Mouse Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
index 296f86b..40a74f5 100644 (file)
@@ -85,7 +85,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -94,7 +94,7 @@ int main(void)
                                if (HID_Host_ConfigurePipes(&Mouse_HID_Interface,\r
                                                            ConfigDescriptorSize, ConfigDescriptorData) != HID_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Mouse.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Mouse.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -102,7 +102,7 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -110,13 +110,13 @@ int main(void)
 \r
                                if (HID_Host_SetReportProtocol(&Mouse_HID_Interface) != 0)\r
                                {\r
-                                       printf("Error Setting Report Protocol Mode or Not a Valid Mouse.\r\n");\r
+                                       puts_P(PSTR("Error Setting Report Protocol Mode or Not a Valid Mouse.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Mouse Enumerated.\r\n");\r
+                               puts_P(PSTR("Mouse Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
index d2baad6..df71f4c 100644 (file)
@@ -77,7 +77,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -86,7 +86,7 @@ int main(void)
                                if (PRNT_Host_ConfigurePipes(&Printer_PRNT_Interface,\r
                                                             ConfigDescriptorSize, ConfigDescriptorData) != PRNT_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Printer Class Device.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Printer Class Device.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -94,7 +94,7 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -102,32 +102,32 @@ int main(void)
                                \r
                                if (PRNT_Host_SetBidirectionalMode(&Printer_PRNT_Interface) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Bidirectional Mode.\r\n");\r
+                                       puts_P(PSTR("Error Setting Bidirectional Mode.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Printer Device Enumerated.\r\n");\r
+                               puts_P(PSTR("Printer Device Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
                        case HOST_STATE_Configured:\r
                                LEDs_SetAllLEDs(LEDMASK_USB_BUSY);\r
                                \r
-                               printf("Retrieving Device ID...\r\n");\r
+                               puts_P(PSTR("Retrieving Device ID...\r\n"));\r
                                \r
                                char DeviceIDString[300];\r
                                if (PRNT_Host_GetDeviceID(&Printer_PRNT_Interface, DeviceIDString,\r
                                                          sizeof(DeviceIDString)) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Getting Device ID.\r\n");\r
+                                       puts_P(PSTR("Error Getting Device ID.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Device ID: %s.\r\n", DeviceIDString);\r
+                               printf_P(PSTR("Device ID: %s.\r\n"), DeviceIDString);\r
                                \r
                                char  TestPageData[]    = "\033%-12345X\033E" "LUFA PCL Test Page" "\033E\033%-12345X";\r
                                uint16_t TestPageLength = strlen(TestPageData);\r
@@ -136,7 +136,7 @@ int main(void)
 \r
                                if (PRNT_Host_SendData(&Printer_PRNT_Interface, &TestPageData, TestPageLength) != PIPE_RWSTREAM_NoError)\r
                                {\r
-                                       printf("Error Sending Page Data.\r\n");\r
+                                       puts_P(PSTR("Error Sending Page Data.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
index f5c3e42..c4f2d0e 100644 (file)
@@ -85,7 +85,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -94,7 +94,7 @@ int main(void)
                                if (RNDIS_Host_ConfigurePipes(&Ethernet_RNDIS_Interface,\r
                                                              ConfigDescriptorSize, ConfigDescriptorData) != RNDIS_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid RNDIS Class Device.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid RNDIS Class Device.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -102,7 +102,7 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -110,20 +110,20 @@ int main(void)
                                \r
                                if (RNDIS_Host_InitializeDevice(&Ethernet_RNDIS_Interface) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Initializing Device.\r\n");\r
+                                       puts_P(PSTR("Error Initializing Device.\r\n"));\r
 \r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;                  \r
                                }\r
                                \r
-                               printf("Device Max Transfer Size: %lu bytes.\r\n", Ethernet_RNDIS_Interface.State.DeviceMaxPacketSize);\r
+                               printf_P(PSTR("Device Max Transfer Size: %lu bytes.\r\n"), Ethernet_RNDIS_Interface.State.DeviceMaxPacketSize);\r
                                \r
                                uint32_t PacketFilter = (REMOTE_NDIS_PACKET_DIRECTED | REMOTE_NDIS_PACKET_BROADCAST | REMOTE_NDIS_PACKET_ALL_MULTICAST);\r
                                if (RNDIS_Host_SetRNDISProperty(&Ethernet_RNDIS_Interface, OID_GEN_CURRENT_PACKET_FILTER,\r
                                                                &PacketFilter, sizeof(PacketFilter)) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Packet Filter.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Packet Filter.\r\n"));\r
 \r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
@@ -134,16 +134,16 @@ int main(void)
                                if (RNDIS_Host_QueryRNDISProperty(&Ethernet_RNDIS_Interface, OID_GEN_VENDOR_ID,\r
                                                                  &VendorID, sizeof(VendorID)) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Getting Vendor ID.\r\n");\r
+                                       puts_P(PSTR("Error Getting Vendor ID.\r\n"));\r
 \r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Device Vendor ID: 0x%08lX\r\n", VendorID);\r
+                               printf_P(PSTR("Device Vendor ID: 0x%08lX\r\n"), VendorID);\r
 \r
-                               printf("RNDIS Device Enumerated.\r\n");\r
+                               puts_P(PSTR("RNDIS Device Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
@@ -168,12 +168,12 @@ void PrintIncomingPackets(void)
                uint16_t PacketLength;\r
                RNDIS_Host_ReadPacket(&Ethernet_RNDIS_Interface, &PacketBuffer, &PacketLength);\r
        \r
-               printf("***PACKET (Size %d)***\r\n", PacketLength);\r
+               printf_P(PSTR("***PACKET (Size %d)***\r\n"), PacketLength);\r
        \r
                for (uint16_t i = 0; i < PacketLength; i++)\r
                  printf("%02x ", PacketBuffer[i]);\r
 \r
-               printf("\r\n\r\n");\r
+               printf_P(PSTR("\r\n\r\n"));\r
                \r
                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
        }\r
index 81bfbe4..944b7fe 100644 (file)
@@ -80,7 +80,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -89,7 +89,7 @@ int main(void)
                                if (SImage_Host_ConfigurePipes(&DigitalCamera_SI_Interface,\r
                                                               ConfigDescriptorSize, ConfigDescriptorData) != SI_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid Still Image Class Device.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid Still Image Class Device.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -97,43 +97,43 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("Still Image Device Enumerated.\r\n");\r
+                               puts_P(PSTR("Still Image Device Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
                        case HOST_STATE_Configured:\r
-                               printf("Opening Session...\r\n");\r
+                               puts_P(PSTR("Opening Session...\r\n"));\r
                                \r
                                if (SImage_Host_OpenSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError)\r
                                {\r
-                                       printf("Could not open PIMA session.\r\n");\r
+                                       puts_P(PSTR("Could not open PIMA session.\r\n"));\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
 \r
-                               printf("Turning off Device...\r\n");\r
+                               puts_P(PSTR("Turning off Device...\r\n"));\r
 \r
                                SImage_Host_SendCommand(&DigitalCamera_SI_Interface, 0x1013, 0, NULL);\r
                                if (SImage_Host_ReceiveResponse(&DigitalCamera_SI_Interface))\r
                                {\r
-                                       printf("Could not turn off device.\r\n");\r
+                                       puts_P(PSTR("Could not turn off device.\r\n"));\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;                                  \r
                                }\r
 \r
-                               printf("Device Off.\r\n");\r
+                               puts_P(PSTR("Device Off.\r\n"));\r
 \r
-                               printf("Closing Session...\r\n");\r
+                               puts_P(PSTR("Closing Session...\r\n"));\r
 \r
                                if (SImage_Host_CloseSession(&DigitalCamera_SI_Interface) != PIPE_RWSTREAM_NoError)\r
                                {\r
-                                       printf("Could not close PIMA session.\r\n");\r
+                                       puts_P(PSTR("Could not close PIMA session.\r\n"));\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
index df6ad97..041a534 100644 (file)
@@ -80,7 +80,7 @@ int main(void)
                                if (USB_Host_GetDeviceConfigDescriptor(1, &ConfigDescriptorSize, ConfigDescriptorData,\r
                                                                       sizeof(ConfigDescriptorData)) != HOST_GETCONFIG_Successful)\r
                                {\r
-                                       printf("Error Retrieving Configuration Descriptor.\r\n");\r
+                                       puts_P(PSTR("Error Retrieving Configuration Descriptor.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -89,7 +89,7 @@ int main(void)
                                if (CDC_Host_ConfigurePipes(&VirtualSerial_CDC_Interface,\r
                                                            ConfigDescriptorSize, ConfigDescriptorData) != CDC_ENUMERROR_NoError)\r
                                {\r
-                                       printf("Attached Device Not a Valid CDC Class Device.\r\n");\r
+                                       puts_P(PSTR("Attached Device Not a Valid CDC Class Device.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
@@ -97,13 +97,13 @@ int main(void)
                                \r
                                if (USB_Host_SetDeviceConfiguration(1) != HOST_SENDCONTROL_Successful)\r
                                {\r
-                                       printf("Error Setting Device Configuration.\r\n");\r
+                                       puts_P(PSTR("Error Setting Device Configuration.\r\n"));\r
                                        LEDs_SetAllLEDs(LEDMASK_USB_ERROR);\r
                                        USB_HostState = HOST_STATE_WaitForDeviceRemoval;\r
                                        break;\r
                                }\r
                                \r
-                               printf("CDC Device Enumerated.\r\n");\r
+                               puts_P(PSTR("CDC Device Enumerated.\r\n"));\r
                                LEDs_SetAllLEDs(LEDMASK_USB_READY);\r
                                USB_HostState = HOST_STATE_Configured;\r
                                break;\r
index 6a0c0ef..7d2b91d 100644 (file)
@@ -14,5 +14,5 @@
 # code.
 
 %:
-       make -C ClassDriver/ $@
-       make -C LowLevel/ $@
+       make -C ClassDriver $@
+       make -C LowLevel $@
index 38c9775..af8932b 100644 (file)
@@ -14,6 +14,6 @@
 # code.
 
 %:
-       make -C Device/ $@
-       make -C Host/ $@
-       make -C DualRole/ $@
+       make -C Device $@
+       make -C Host $@
+       make -C DualRole $@
index 5f1b2ea..a59a213 100644 (file)
                         *  \param[in,out] Data  Pointer to a number containing an even number of bytes to be reversed\r
                         *  \param[in] Bytes  Length of the data in bytes\r
                         */\r
-                       static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes);\r
-                       static inline void SwapEndian_n(uint8_t* Data, uint8_t Bytes)\r
+                       static inline void SwapEndian_n(void* Data, uint8_t Bytes);\r
+                       static inline void SwapEndian_n(void* Data, uint8_t Bytes)\r
                        {\r
-                               uint8_t Temp;\r
-                               \r
+                               uint8_t* CurrDataPos = Data;\r
+                       \r
                                while (Bytes)\r
                                {\r
-                                       Temp = *Data;\r
-                                       *Data = *(Data + Bytes - 1);\r
-                                       *(Data + Bytes - 1) = Temp;\r
+                                       uint8_t Temp = *CurrDataPos;\r
+                                       *CurrDataPos = *(CurrDataPos + Bytes - 1);\r
+                                       *(CurrDataPos + Bytes - 1) = Temp;\r
 \r
-                                       Data++;\r
+                                       CurrDataPos++;\r
                                        Bytes -= 2;\r
                                }\r
                        }\r
index 4ec0b24..f148f4e 100644 (file)
@@ -134,7 +134,8 @@ static uint8_t MS_Host_SendCommand(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
 {\r
        uint8_t ErrorCode = PIPE_RWSTREAM_NoError;\r
 \r
-       SCSICommandBlock->Tag = ++MSInterfaceInfo->State.TransactionTag;\r
+       SCSICommandBlock->Signature = CBW_SIGNATURE;\r
+       SCSICommandBlock->Tag       = ++MSInterfaceInfo->State.TransactionTag;\r
 \r
        if (MSInterfaceInfo->State.TransactionTag == 0xFFFFFFFF)\r
          MSInterfaceInfo->State.TransactionTag = 1;\r
@@ -334,7 +335,6 @@ uint8_t MS_Host_GetInquiryData(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, c
 \r
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)\r
                {\r
-                       .Signature          = CBW_SIGNATURE,\r
                        .DataTransferLength = sizeof(SCSI_Inquiry_Response_t),\r
                        .Flags              = COMMAND_DIRECTION_DATA_IN,\r
                        .LUN                = LUNIndex,\r
@@ -370,7 +370,6 @@ uint8_t MS_Host_TestUnitReady(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, co
 \r
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)\r
                {\r
-                       .Signature          = CBW_SIGNATURE,\r
                        .DataTransferLength = 0,\r
                        .Flags              = COMMAND_DIRECTION_DATA_IN,\r
                        .LUN                = LUNIndex,\r
@@ -407,7 +406,6 @@ uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
 \r
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)\r
                {\r
-                       .Signature          = CBW_SIGNATURE,\r
                        .DataTransferLength = sizeof(SCSI_Capacity_t),\r
                        .Flags              = COMMAND_DIRECTION_DATA_IN,\r
                        .LUN                = LUNIndex,\r
@@ -432,8 +430,8 @@ uint8_t MS_Host_ReadDeviceCapacity(USB_ClassInfo_MS_Host_t* const MSInterfaceInf
        if ((ErrorCode = MS_Host_SendCommand(MSInterfaceInfo, &SCSICommandBlock, DeviceCapacity)) != PIPE_RWSTREAM_NoError)\r
          return ErrorCode;\r
 \r
-       DeviceCapacity->Blocks    = SwapEndian_32(DeviceCapacity->Blocks);\r
-       DeviceCapacity->BlockSize = SwapEndian_32(DeviceCapacity->BlockSize);\r
+       SwapEndian_n(&DeviceCapacity->Blocks,    sizeof(DeviceCapacity->Blocks));\r
+       SwapEndian_n(&DeviceCapacity->BlockSize, sizeof(DeviceCapacity->BlockSize));\r
        \r
        if ((ErrorCode = MS_Host_GetReturnedStatus(MSInterfaceInfo, &SCSICommandStatus)) != PIPE_RWSTREAM_NoError)\r
          return ErrorCode;\r
@@ -451,7 +449,6 @@ uint8_t MS_Host_RequestSense(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo, con
 \r
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)\r
                {\r
-                       .Signature          = CBW_SIGNATURE,\r
                        .DataTransferLength = sizeof(SCSI_Request_Sense_Response_t),\r
                        .Flags              = COMMAND_DIRECTION_DATA_IN,\r
                        .LUN                = LUNIndex,\r
@@ -488,7 +485,6 @@ uint8_t MS_Host_PreventAllowMediumRemoval(USB_ClassInfo_MS_Host_t* const MSInter
 \r
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)\r
                {\r
-                       .Signature          = CBW_SIGNATURE,\r
                        .DataTransferLength = 0,\r
                        .Flags              = COMMAND_DIRECTION_DATA_OUT,\r
                        .LUN                = LUNIndex,\r
@@ -525,7 +521,6 @@ uint8_t MS_Host_ReadDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo,
 \r
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)\r
                {\r
-                       .Signature          = CBW_SIGNATURE,\r
                        .DataTransferLength = ((uint32_t)Blocks * BlockSize),\r
                        .Flags              = COMMAND_DIRECTION_DATA_IN,\r
                        .LUN                = LUNIndex,\r
@@ -566,7 +561,6 @@ uint8_t MS_Host_WriteDeviceBlocks(USB_ClassInfo_MS_Host_t* const MSInterfaceInfo
 \r
        MS_CommandBlockWrapper_t SCSICommandBlock = (MS_CommandBlockWrapper_t)\r
                {\r
-                       .Signature          = CBW_SIGNATURE,\r
                        .DataTransferLength = ((uint32_t)Blocks * BlockSize),\r
                        .Flags              = COMMAND_DIRECTION_DATA_OUT,\r
                        .LUN                = LUNIndex,\r
index 2a772b8..04aa9a4 100644 (file)
@@ -29,6 +29,7 @@
   *    builds of avrdude at the expense of AVRStudio compatibility\r
   *  - Removed two-step endpoint/pipe bank clear and switch sequence for smaller, faster endpoint/pipe code\r
   *  - The USB_Init() function no longer calls sei() - the user is now responsible for enabling interrupts when they are ready\r
+  *    for them to be enabled (thanks to Andrei Krainev)\r
   *\r
   *  <b>Fixed:</b>\r
   *  - Fixed software PDI/TPI programming mode in the AVRISP project not correctly toggling just the clock pin\r
index d6d191e..db5cd51 100644 (file)
--- a/makefile
+++ b/makefile
@@ -18,9 +18,9 @@ all:
 %:\r
        @echo Executing \"make $@\" on all LUFA library elements.\r
        @echo\r
-       make -C LUFA/ $@ -s\r
-       make -C Demos/ $@ -s\r
-       make -C Projects/ $@ -s\r
-       make -C Bootloaders/ $@ -s\r
+       make -C LUFA $@ -s\r
+       make -C Demos $@ -s\r
+       make -C Projects $@ -s\r
+       make -C Bootloaders $@ -s\r
        @echo\r
        @echo LUFA \"make $@\" operation complete.\r