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/Peripheral/SerialStream.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
50 /** Prefix sent through the USART when an even fires before the actual event message. */
51 #define EVENT_PREFIX ESC_INVERSE_ON "EVENT:" ESC_INVERSE_OFF " "
53 /* Function Prototypes: */
54 #if defined(INCLUDE_FROM_TESTEVENTS_C) || defined(__DOXYGEN__)
55 static void Abort_Program(void) ATTR_NO_RETURN
;
58 void EVENT_USB_VBUSChange(void);
59 void EVENT_USB_VBUSConnect(void);
60 void EVENT_USB_VBUSDisconnect(void);
61 void EVENT_USB_Connect(void);
62 void EVENT_USB_Disconnect(void);
63 void EVENT_USB_InitFailure(const uint8_t ErrorCode
);
64 void EVENT_USB_UIDChange(void);
65 void EVENT_USB_HostError(const uint8_t ErrorCode
);
66 void EVENT_USB_DeviceAttached(void);
67 void EVENT_USB_DeviceUnattached(void);
68 void EVENT_USB_DeviceEnumerationFailed(const uint8_t ErrorCode
, const uint8_t SubErrorCode
);
69 void EVENT_USB_DeviceEnumerationComplete(void);
70 void EVENT_USB_UnhandledControlPacket(void);
71 void EVENT_USB_ConfigurationChanged(void);
72 void EVENT_USB_Suspend(void);
73 void EVENT_USB_WakeUp(void);
74 void EVENT_USB_Reset(void);
75 void EVENT_USB_DeviceError(const uint8_t ErrorCode
);