From f8d340a9ddaf8d4c90c2f25060d492d7500f3fed Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 28 Dec 2017 16:57:12 -0500 Subject: [PATCH] enable corret endpoint --- tmk_core/protocol/lufa/descriptor.h | 4 ++-- tmk_core/protocol/lufa/lufa.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tmk_core/protocol/lufa/descriptor.h b/tmk_core/protocol/lufa/descriptor.h index 61c42c9d..ccec89ca 100644 --- a/tmk_core/protocol/lufa/descriptor.h +++ b/tmk_core/protocol/lufa/descriptor.h @@ -208,8 +208,8 @@ typedef struct #ifdef CONSOLE_ENABLE # define CONSOLE_IN_EPNUM (RAW_OUT_EPNUM + 1) -//# define CONSOLE_OUT_EPNUM (RAW_OUT_EPNUM + 2) -# define CONSOLE_OUT_EPNUM (RAW_OUT_EPNUM + 1) +# define CONSOLE_OUT_EPNUM (RAW_OUT_EPNUM + 2) +//# define CONSOLE_OUT_EPNUM (RAW_OUT_EPNUM + 1) #else # define CONSOLE_OUT_EPNUM RAW_OUT_EPNUM #endif diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index c6d4d878..530cc012 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -327,6 +327,7 @@ static void Console_Task(void) Endpoint_ClearIN(); } // CONSOLE_FLUSH_SET(false); + console_flush = false; } Endpoint_SelectEndpoint(ep); @@ -398,7 +399,8 @@ void EVENT_USB_Device_WakeUp() -#ifdef CONSOLE_ENABLE +// #ifdef CONSOLE_ENABLE +#if 0 // called every 1ms void EVENT_USB_Device_StartOfFrame(void) @@ -1113,7 +1115,7 @@ static void setup_usb(void) USB_Init(); // for Console_Task - USB_Device_EnableSOFEvents(); + //USB_Device_EnableSOFEvents(); print_set_sendchar(sendchar); } @@ -1228,6 +1230,10 @@ int main(void) raw_hid_task(); #endif +#ifdef CONSOLE_ENABLE + Console_Task(); +#endif + #if !defined(INTERRUPT_CONTROL_ENDPOINT) USB_USBTask(); #endif