Skip to content

Commit c20cd29

Browse files
committed
lufa: Fix endpoint bank mode for ATMega32u2
1 parent 82ac21f commit c20cd29

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

protocol/lufa/lufa.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ void EVENT_USB_Device_StartOfFrame(void)
217217

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

0 commit comments

Comments
 (0)