Make Benito ping-pong LED code more explicit, using masks of the TX and RX LED masks...
authorDean Camera <dean@fourwalledcubicle.com>
Fri, 7 Aug 2009 00:27:11 +0000 (00:27 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Fri, 7 Aug 2009 00:27:11 +0000 (00:27 +0000)
Fix incorrect event name in MassStorageHost.c.

Demos/Host/LowLevel/MassStorageHost/MassStorageHost.c
LUFA/Drivers/USB/HighLevel/StdDescriptors.h
LUFA/Drivers/USB/HighLevel/USBTask.h
Projects/Benito/Benito.c

index 4f02e51..2b27b12 100644 (file)
@@ -103,7 +103,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
 }\r
 \r
 /** Event handler for the USB_HostError event. This indicates that a hardware error occurred while in host mode. */\r
-void EVENT_USB_HostError(const uint8_t ErrorCode)\r
+void EVENT_USB_Host_HostError(const uint8_t ErrorCode)\r
 {\r
        USB_ShutDown();\r
 \r
index 274b84f..0e0d1e9 100644 (file)
                                 *  On unsupported devices, this will evaluate to NO_DESCRIPTOR and so will force the host to create a pseduo-serial\r
                                 *  number for the device.\r
                                 */\r
-                               #define USE_INTERNAL_SERIAL         0xDC\r
+                               #define USE_INTERNAL_SERIAL           0xDC\r
                        #else\r
-                               #define USE_INTERNAL_SERIAL         NO_DESCRIPTOR\r
+                               #define USE_INTERNAL_SERIAL           NO_DESCRIPTOR\r
                        #endif\r
                        \r
                        /** Macro to calculate the power value for the device descriptor, from a given number of milliamps. */\r
-                       #define USB_CONFIG_POWER_MA(mA)            (mA >> 1)\r
+                       #define USB_CONFIG_POWER_MA(mA)           (mA >> 1)\r
 \r
                        /** Macro to calculate the Unicode length of a string with a given number of Unicode characters.\r
                         *  Should be used in string descriptor's headers for giving the string descriptor's byte length.\r
index 08accc1..9c0abf0 100644 (file)
                #include <avr/io.h>\r
                #include <avr/interrupt.h>\r
                #include <stdbool.h>\r
-               #include <stddef.h>\r
                \r
                #include "../LowLevel/LowLevel.h"\r
-               #include "StdRequestType.h"\r
-               #include "USBMode.h"\r
                #include "Events.h"\r
+               #include "StdRequestType.h"\r
                #include "StdDescriptors.h"\r
+               #include "USBMode.h"\r
+\r
+               #if defined(USB_CAN_BE_DEVICE)\r
+                       #include "../LowLevel/DevChapter9.h"\r
+               #endif\r
 \r
                #if defined(USB_CAN_BE_HOST)\r
                        #include "../LowLevel/HostChapter9.h"\r
-               #endif          \r
+               #endif\r
                \r
        /* Enable C linkage for C++ Compilers: */\r
                #if defined(__cplusplus)\r
index 100c897..afe29b4 100644 (file)
@@ -102,7 +102,7 @@ int main(void)
                        /* Check if the LEDs should be ping-ponging (during enumeration) */\r
                        if (PingPongMSRemaining && !(--PingPongMSRemaining))\r
                        {\r
-                               LEDs_ToggleLEDs(LEDMASK_BUSY);\r
+                               LEDs_ToggleLEDs(LEDMASK_TX | LEDMASK_RX);\r
                                PingPongMSRemaining = PING_PONG_LED_PULSE_MS;\r
                        }\r
                \r