浏览代码

lufa: Fix endpoint bank mode for ATMega32u2

tags/v2.9
tmk 8 年前
父节点
当前提交
bf3d4b3c06
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4
    1
      tmk_core/protocol/lufa/lufa.c

+ 4
- 1
tmk_core/protocol/lufa/lufa.c 查看文件



/** Event handler for the USB_ConfigurationChanged event. /** Event handler for the USB_ConfigurationChanged event.
* This is fired when the host sets the current configuration of the USB device after enumeration. * 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) void EVENT_USB_Device_ConfigurationChanged(void)
{ {
#ifdef CONSOLE_ENABLE #ifdef CONSOLE_ENABLE
/* Setup Console HID Report Endpoints */ /* Setup Console HID Report Endpoints */
ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN, ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_IN_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_IN,
CONSOLE_EPSIZE, ENDPOINT_BANK_DOUBLE);
CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE);
#if 0 #if 0
ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT, ConfigSuccess &= ENDPOINT_CONFIG(CONSOLE_OUT_EPNUM, EP_TYPE_INTERRUPT, ENDPOINT_DIR_OUT,
CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE); CONSOLE_EPSIZE, ENDPOINT_BANK_SINGLE);

正在加载...
取消
保存