diff options
| author | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-05-18 10:05:21 +0000 |
|---|---|---|
| committer | Dean <Dean@d5102386-fcda-11dd-9fdb-3debd5008f28> | 2009-05-18 10:05:21 +0000 |
| commit | bdb6e45008319647b72d9adc8fb4ec06a0f1ea9b (patch) | |
| tree | 1f4de5f6d8e2a9bfe89d3263f19f9b9ebf855812 /Bootloaders/DFU | |
| parent | a74816480d92f683b2d11682d516f347a1a69301 (diff) | |
Rewritten event system to remove all macros, to make user code clearer.
Fixed incorrect ENDPOINT_EPNUM_MASK mask preventing endpoints above EP3 from being selected (thanks to Jonathan Oakley).
Removed STREAM_CALLBACK() macro - callbacks now use regular function definitions to clarify user code.
Removed DESCRIPTOR_COMPARATOR() macro - comparators should now use regular function definitions to clarify user code.
git-svn-id: http://lufa-lib.googlecode.com/svn/trunk@554 d5102386-fcda-11dd-9fdb-3debd5008f28
Diffstat (limited to 'Bootloaders/DFU')
| -rw-r--r-- | Bootloaders/DFU/BootloaderDFU.c | 4 | ||||
| -rw-r--r-- | Bootloaders/DFU/BootloaderDFU.h | 12 | ||||
| -rw-r--r-- | Bootloaders/DFU/makefile | 2 |
3 files changed, 7 insertions, 11 deletions
diff --git a/Bootloaders/DFU/BootloaderDFU.c b/Bootloaders/DFU/BootloaderDFU.c index 83881f13..10a30167 100644 --- a/Bootloaders/DFU/BootloaderDFU.c +++ b/Bootloaders/DFU/BootloaderDFU.c @@ -139,7 +139,7 @@ int main (void) /** Event handler for the USB_Disconnect event. This indicates that the bootloader should exit and the user
* application started.
*/
-EVENT_HANDLER(USB_Disconnect)
+void EventHandler_USB_Disconnect(void)
{
/* Upon disconnection, run user application */
RunBootloader = false;
@@ -149,7 +149,7 @@ EVENT_HANDLER(USB_Disconnect) * control requests that are not handled internally by the USB library (including the DFU commands, which are
* all issued via the control endpoint), so that they can be handled appropriately for the application.
*/
-EVENT_HANDLER(USB_UnhandledControlPacket)
+void EventHandler_USB_UnhandledControlPacket(void)
{
/* Get the size of the command and data from the wLength value */
SentCommand.DataSize = USB_ControlRequest.wLength;
diff --git a/Bootloaders/DFU/BootloaderDFU.h b/Bootloaders/DFU/BootloaderDFU.h index e996f2b7..a78d80d0 100644 --- a/Bootloaders/DFU/BootloaderDFU.h +++ b/Bootloaders/DFU/BootloaderDFU.h @@ -191,15 +191,11 @@ errUNKNOWN = 14,
errSTALLEDPKT = 15
};
-
- /* Event Handlers: */
- /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */
- HANDLES_EVENT(USB_Disconnect);
-
- /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */
- HANDLES_EVENT(USB_UnhandledControlPacket);
-
+
/* Function Prototypes: */
+ void EVENT_USB_Disconnect(void);
+ void EVENT_USB_UnhandledControlPacket(void);
+
#if defined(INCLUDE_FROM_BOOTLOADER_C)
static void DiscardFillerBytes(uint8_t NumberOfBytes);
static void ProcessBootloaderCommand(void);
diff --git a/Bootloaders/DFU/makefile b/Bootloaders/DFU/makefile index 124ea58c..94525c10 100644 --- a/Bootloaders/DFU/makefile +++ b/Bootloaders/DFU/makefile @@ -503,7 +503,7 @@ sizeafter: checkhooks: build
@echo
@echo ------- Unhooked LUFA Events -------
- @$(shell) (grep -s '^Event.*LUFA/.*\\.o' $(TARGET).map | \
+ @$(shell) (grep -s '^EVENT_.*LUFA/.*\\.o' $(TARGET).map | \
cut -d' ' -f1 | cut -d'_' -f2- | grep ".*") || \
echo "(None)"
@echo ------------------------------------
|
