123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- #ifndef _BOOTLOADER_MASS_STORAGE_H_
- #define _BOOTLOADER_MASS_STORAGE_H_
-
- #include <avr/io.h>
- #include <avr/wdt.h>
- #include <avr/power.h>
- #include <avr/interrupt.h>
- #include <string.h>
- #include "Descriptors.h"
- #include "Config/AppConfig.h"
- #include "Lib/SCSI.h"
- #include <LUFA/Drivers/Board/LEDs.h>
- #include <LUFA/Drivers/USB/USB.h>
- #include <LUFA/Platform/Platform.h>
-
- #if !defined(__OPTIMIZE_SIZE__)
- #error This bootloader requires that it be optimized for size, not speed, to fit into the target device. Change optimization settings and try again.
- #endif
-
-
- #define LEDMASK_USB_NOTREADY LEDS_LED1
-
- #define LEDMASK_USB_ENUMERATING (LEDS_LED2 | LEDS_LED3)
-
- #define LEDMASK_USB_READY (LEDS_LED2 | LEDS_LED4)
-
- #define LEDMASK_USB_ERROR (LEDS_LED1 | LEDS_LED3)
-
- #define LEDMASK_USB_BUSY LEDS_LED2
-
- #define MAGIC_BOOT_KEY 0xDC42
-
- extern bool RunBootloader;
-
- int main(void) AUX_BOOT_SECTION;
- void Application_Jump_Check(void) ATTR_INIT_SECTION(3);
- void EVENT_USB_Device_Connect(void) AUX_BOOT_SECTION;
- void EVENT_USB_Device_Disconnect(void) AUX_BOOT_SECTION;
- void EVENT_USB_Device_ConfigurationChanged(void) AUX_BOOT_SECTION;
- void EVENT_USB_Device_ControlRequest(void) AUX_BOOT_SECTION;
- bool CALLBACK_MS_Device_SCSICommandReceived(USB_ClassInfo_MS_Device_t* const MSInterfaceInfo) AUX_BOOT_SECTION;
- #if defined(INCLUDE_FROM_BOOTLOADER_MASSSTORAGE_C)
- static void SetupHardware(void) AUX_BOOT_SECTION;
- #endif
- #endif
|