1
0
mirror of https://github.com/raphnet/gc_n64_usb-v3 synced 2024-11-16 06:05:00 -05:00
gc_n64_usb-v3/bootloader.c

18 lines
250 B
C
Raw Normal View History

2015-08-16 01:59:38 -04:00
#include <avr/io.h>
#include "usb.h"
void enterBootLoader(void)
{
usb_shutdown();
// AT90USB1287/1286 : 0xF000 (word address)
// ATmega32u2 : ???
asm volatile(
"cli \n"
"ldi r30, 0x00 \n" // ZL
"ldi r31, 0xF0 \n" // ZH
"ijmp");
}