projects
/
pub
/
USBasp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update to latest Atmel Studio integration binary, improve Getting Started page in...
[pub/USBasp.git]
/
LUFA
/
DoxygenPages
/
SoftwareBootloaderJump.txt
diff --git
a/LUFA/DoxygenPages/SoftwareBootloaderJump.txt
b/LUFA/DoxygenPages/SoftwareBootloaderJump.txt
index
09de923
..
0b69612
100644
(file)
--- a/
LUFA/DoxygenPages/SoftwareBootloaderJump.txt
+++ b/
LUFA/DoxygenPages/SoftwareBootloaderJump.txt
@@
-25,15
+25,15
@@
* #include <avr/wdt.h>
* #include <avr/io.h>
* #include <util/delay.h>
* #include <avr/wdt.h>
* #include <avr/io.h>
* #include <util/delay.h>
- *
+ *
* #include <LUFA/Common/Common.h>
* #include <LUFA/Drivers/USB/USB.h>
* #include <LUFA/Common/Common.h>
* #include <LUFA/Drivers/USB/USB.h>
- *
+ *
* uint32_t Boot_Key ATTR_NO_INIT;
* uint32_t Boot_Key ATTR_NO_INIT;
- *
+ *
* #define MAGIC_BOOT_KEY 0xDC42ACCA
* #define MAGIC_BOOT_KEY 0xDC42ACCA
- * #define BOOTLOADER_START_ADDRESS (
FLASH_SIZE_BYTES - BOOTLOADER_SEC_SIZE_BYTES
)
- *
+ * #define BOOTLOADER_START_ADDRESS (
(FLASH_SIZE_BYTES - BOOTLOADER_SEC_SIZE_BYTES) >> 1
)
+ *
* void Bootloader_Jump_Check(void) ATTR_INIT_SECTION(3);
* void Bootloader_Jump_Check(void)
* {
* void Bootloader_Jump_Check(void) ATTR_INIT_SECTION(3);
* void Bootloader_Jump_Check(void)
* {
@@
-44,18
+44,18
@@
* ((void (*)(void))BOOTLOADER_START_ADDRESS)();
* }
* }
* ((void (*)(void))BOOTLOADER_START_ADDRESS)();
* }
* }
- *
+ *
* void Jump_To_Bootloader(void)
* {
* // If USB is used, detach from the bus and reset it
* USB_Disable();
* void Jump_To_Bootloader(void)
* {
* // If USB is used, detach from the bus and reset it
* USB_Disable();
- *
+ *
* // Disable all interrupts
* cli();
* // Disable all interrupts
* cli();
- *
+ *
* // Wait two seconds for the USB detachment to register on the host
* Delay_MS(2000);
* // Wait two seconds for the USB detachment to register on the host
* Delay_MS(2000);
- *
+ *
* // Set the bootloader key to the magic value and force a reset
* Boot_Key = MAGIC_BOOT_KEY;
* wdt_enable(WDTO_250MS);
* // Set the bootloader key to the magic value and force a reset
* Boot_Key = MAGIC_BOOT_KEY;
* wdt_enable(WDTO_250MS);