usb_usb: Add Makefiles
This commit is contained in:
parent
3eae475f8b
commit
a38dd9dda5
4 changed files with 16 additions and 0 deletions
5
converter/usb_usb/Makefile.8mhz
Normal file
5
converter/usb_usb/Makefile.8mhz
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
F_CPU = 8000000
|
||||
F_USB = 16000000
|
||||
UNIMAP_ENABLE = yes
|
||||
KEYMAP_SECTION_ENABLE = yes
|
||||
include Makefile
|
||||
6
converter/usb_usb/Makefile.debug
Normal file
6
converter/usb_usb/Makefile.debug
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
TARGET = usb_usb_debug
|
||||
UNIMAP_ENABLE = yes
|
||||
#KEYMAP_SECTION_ENABLE = yes
|
||||
#LUFA_DEBUG = yes
|
||||
OPT_DEFS += -DDEBUG_USB_HOST
|
||||
include Makefile
|
||||
|
|
@ -42,7 +42,11 @@ static void LUFA_setup(void)
|
|||
wdt_disable();
|
||||
|
||||
/* Disable clock division */
|
||||
#if (F_CPU == 8000000)
|
||||
clock_prescale_set(clock_div_2); // 16MHz crystal divided by 2
|
||||
#else
|
||||
clock_prescale_set(clock_div_1);
|
||||
#endif
|
||||
|
||||
// Leonardo needs. Without this USB device is not recognized.
|
||||
USB_Disable();
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ uint8_t matrix_scan(void) {
|
|||
|
||||
// restore LED state when keyboard comes up
|
||||
if (usb_state == USB_STATE_RUNNING) {
|
||||
dprintf("speed: %s\n", usb_host.getVbusState()==FSHOST ? "full" : "low");
|
||||
keyboard_set_leds(host_keyboard_leds());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue