mirror of
https://github.com/raphnet/gc_n64_usb-v3
synced 2024-12-21 23:08:53 -05:00
Merge pull request #5 from dsprenkels/atmega32u4
Add support for atmega32u4 chip
This commit is contained in:
commit
59c2627f40
4
Makefile
4
Makefile
@ -54,10 +54,10 @@ justflash: $(HEXFILE)
|
||||
./scripts/wait_then_flash.sh $(CPU) $(HEXFILE)
|
||||
|
||||
chip_erase:
|
||||
dfu-programmer atmega32u2 erase
|
||||
dfu-programmer $(CPU) erase
|
||||
|
||||
reset:
|
||||
dfu-programmer atmega32u2 reset
|
||||
dfu-programmer $(CPU) reset
|
||||
|
||||
restart:
|
||||
- ./scripts/enter_bootloader.sh
|
||||
|
4
usb.c
4
usb.c
@ -785,7 +785,7 @@ void usb_doTasks(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__AVR_ATmega32U2__)
|
||||
#if defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega32U4__)
|
||||
|
||||
/* Atmega32u2 datasheet 8.11.6, PLLCSR.
|
||||
* But register summary says PLLP0... */
|
||||
@ -851,8 +851,10 @@ void usb_init(const struct usb_parameters *params)
|
||||
USBCON |= (1<<FRZCLK); // initial value
|
||||
#ifdef UHWCON
|
||||
UHWCON |= (1<<UVREGE); // Enable USB pad regulator
|
||||
#if defined(UIDE) && defined(UIMOD)
|
||||
UHWCON &= ~(1<<UIDE);
|
||||
UHWCON |= (1<UIMOD);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef UPOE
|
||||
|
Loading…
Reference in New Issue
Block a user