mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2025-01-30 23:00:11 -05:00
Fix functionality when coming from boot loader
This commit is contained in:
parent
0627841025
commit
49a33c5b06
12
usb.c
12
usb.c
@ -707,6 +707,18 @@ static void pll_init(void)
|
||||
|
||||
void usb_init(const struct usb_parameters *params)
|
||||
{
|
||||
// Initialize the registers to the default values
|
||||
// from the datasheet. The bootloader that sometimes
|
||||
// runs before we get here (when doing updates) leaves
|
||||
// different values...
|
||||
#ifdef UHWCON
|
||||
UHWCON = 0x80;
|
||||
#endif
|
||||
USBCON = 0x20;
|
||||
UDCON = 0x01;
|
||||
UDIEN = 0x00;
|
||||
UDADDR = 0x00;
|
||||
|
||||
g_params = params;
|
||||
|
||||
// Set some initial values
|
||||
|
Loading…
Reference in New Issue
Block a user