3      Copyright (C) Dean Camera, 2009. 
   5   dean [at] fourwalledcubicle [dot] com 
   6       www.fourwalledcubicle.com 
  10   Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com) 
  12   Permission to use, copy, modify, and distribute this software 
  13   and its documentation for any purpose and without fee is hereby 
  14   granted, provided that the above copyright notice appear in all 
  15   copies and that both that the copyright notice and this 
  16   permission notice and warranty disclaimer appear in supporting 
  17   documentation, and that the name of the author not be used in 
  18   advertising or publicity pertaining to distribution of the 
  19   software without specific, written prior permission. 
  21   The author disclaim all warranties with regard to this 
  22   software, including all implied warranties of merchantability 
  23   and fitness.  In no event shall the author be liable for any 
  24   special, indirect or consequential damages or any damages 
  25   whatsoever resulting from loss of use, data or profits, whether 
  26   in an action of contract, negligence or other tortious action, 
  27   arising out of or in connection with the use or performance of 
  33  *  Header file for TestEvents.c. 
  36 #ifndef _TESTEVENTS_H_ 
  37 #define _TESTEVENTS_H_ 
  42                 #include <LUFA/Common/Common.h>                          // Commonly used macros 
  43                 #include <LUFA/Drivers/USB/USB.h>                        // USB Functionality 
  44                 #include <LUFA/Drivers/Board/LEDs.h>                     // LED driver 
  45                 #include <LUFA/Drivers/AT90USBXXX/Serial_Stream.h>       // USART Stream driver 
  46                 #include <LUFA/Drivers/Misc/TerminalCodes.h>             // ANSI Terminal Escape Codes 
  47                 #include <LUFA/Scheduler/Scheduler.h>                    // Simple scheduler for task management 
  49         /* Event Catch List: */ 
  50                 /** Indicates that this module will catch the USB_VBUSChange event when thrown by the library. */ 
  51                 HANDLES_EVENT(USB_VBUSChange
); 
  53                 /** Indicates that this module will catch the USB_VBUSConnect event when thrown by the library. */ 
  54                 HANDLES_EVENT(USB_VBUSConnect
); 
  56                 /** Indicates that this module will catch the USB_VBUSDisconnect event when thrown by the library. */ 
  57                 HANDLES_EVENT(USB_VBUSDisconnect
); 
  59                 /** Indicates that this module will catch the USB_Connect event when thrown by the library. */ 
  60                 HANDLES_EVENT(USB_Connect
); 
  62                 /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */ 
  63                 HANDLES_EVENT(USB_Disconnect
); 
  65                 /** Indicates that this module will catch the USB_Suspend event when thrown by the library. */ 
  66                 HANDLES_EVENT(USB_Suspend
); 
  68                 /** Indicates that this module will catch the USB_WakeUp event when thrown by the library. */ 
  69                 HANDLES_EVENT(USB_WakeUp
); 
  71                 /** Indicates that this module will catch the USB_Reset event when thrown by the library. */ 
  72                 HANDLES_EVENT(USB_Reset
); 
  74                 /** Indicates that this module will catch the USB_UIDChange event when thrown by the library. */ 
  75                 HANDLES_EVENT(USB_UIDChange
); 
  77                 /** Indicates that this module will catch the USB_PowerOnFail event when thrown by the library. */ 
  78                 HANDLES_EVENT(USB_PowerOnFail
); 
  80                 /** Indicates that this module will catch the USB_HostError event when thrown by the library. */ 
  81                 HANDLES_EVENT(USB_HostError
); 
  83                 /** Indicates that this module will catch the USB_DeviceEnumerationFailed event when thrown by the library. */ 
  84                 HANDLES_EVENT(USB_DeviceEnumerationFailed
); 
  86                 /** Indicates that this module will catch the USB_DeviceError event when thrown by the library. */ 
  87                 HANDLES_EVENT(USB_DeviceError
); 
  89                 /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */ 
  90                 HANDLES_EVENT(USB_UnhandledControlPacket
); 
  92                 /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */ 
  93                 HANDLES_EVENT(USB_ConfigurationChanged
); 
  95                 /** Indicates that this module will catch the USB_DeviceAttached event when thrown by the library. */ 
  96                 HANDLES_EVENT(USB_DeviceAttached
); 
  98                 /** Indicates that this module will catch the USB_DeviceUnattached event when thrown by the library. */ 
  99                 HANDLES_EVENT(USB_DeviceUnattached
); 
 102                 /** Prefix sent through the USART when an even fires before the actual event message. */ 
 103                 #define EVENT_PREFIX ESC_INVERSE_ON "EVENT:" ESC_INVERSE_OFF " " 
 105         /* Function Prototypes: */ 
 106                 #if defined(INCLUDE_FROM_TESTEVENTS_C) || defined(__DOXYGEN__) 
 107                         static void Abort_Program(void) ATTR_NO_RETURN
;