Use the PDI REPEAT instruction in the PDI programmer code to reduce protocol overhead...
[pub/USBasp.git] / Bootloaders / TeensyHID / TeensyHID.h
index a53fca3..a05729a 100644 (file)
                #include <avr/wdt.h>\r
                #include <avr/boot.h>\r
                #include <avr/wdt.h>\r
+               #include <avr/power.h>\r
                #include <util/delay.h>\r
                #include <stdbool.h>\r
 \r
                #include "Descriptors.h"\r
 \r
-               #include <LUFA/Version.h>                    // Library Version Information\r
-               #include <LUFA/Drivers/USB/USB.h>            // USB Functionality\r
+               #include <LUFA/Drivers/USB/USB.h>\r
                \r
        /* Preprocessor Checks: */\r
-               #if !defined(__AVR_AT90USB162__)\r
+               #if !defined(__AVR_AT90USB162__) && !defined(__AVR_AT90USB646__)\r
                        #error This bootloader is not compatible with the selected AVR model.\r
                #endif\r
 \r
        /* Macros: */\r
                /** HID Class specific request to send the next HID report to the device. */\r
-               #define REQ_SetReport           0x09\r
+               #define REQ_SetReport             0x09\r
                \r
-               #define TEENSY_STARTAPPLICATION 0xFFFF\r
-\r
-       /* Event Handlers: */\r
-               /** Indicates that this module will catch the USB_Disconnect event when thrown by the library. */\r
-               HANDLES_EVENT(USB_Disconnect);\r
-\r
-               /** Indicates that this module will catch the USB_ConfigurationChanged event when thrown by the library. */\r
-               HANDLES_EVENT(USB_ConfigurationChanged);\r
+               /** Teensy Bootloader special address to start the user application */\r
+               #define TEENSY_STARTAPPLICATION   0xFFFF\r
+               \r
+       /* Function Prototypes: */\r
+               void SetupHardware(void);\r
 \r
-               /** Indicates that this module will catch the USB_UnhandledControlPacket event when thrown by the library. */\r
-               HANDLES_EVENT(USB_UnhandledControlPacket);\r
+               void EVENT_USB_Device_ConfigurationChanged(void);\r
+               void EVENT_USB_Device_UnhandledControlRequest(void);\r
                \r
 #endif\r