Skip to content

Commit

Permalink
lufa: Fix endpoint bank mode for ATMega32u2
Browse files Browse the repository at this point in the history
  • Loading branch information
tmk committed Sep 20, 2015
1 parent 0b14b56 commit bf3d4b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tmk_core/protocol/lufa/lufa.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ void EVENT_USB_Device_StartOfFrame(void)

/** Event handler for the USB_ConfigurationChanged event.
* This is fired when the host sets the current configuration of the USB device after enumeration.
*
* ATMega32u2 supports dual bank(ping-pong mode) only on endpoint 3 and 4,
* it is safe to use singl bank for all endpoints.
*/
void EVENT_USB_Device_ConfigurationChanged(void)
{
Expand All @@ -241,7 +244,7 @@ void EVENT_USB_Device_ConfigurationChanged(void)
#ifdef CONSOLE_ENABLE
/* Setup Console HID Report Endpoints */
ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
CONSOLE_EPSIZE, ENDPOINT_BANK_DOUBLE);
CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE);
#if 0
ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,
CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE);
Expand Down

0 comments on commit bf3d4b3

Please sign in to comment.