Browse Source

Chibios: cleanup usb_main code.

tags/v2.9
flabbergast 8 years ago
parent
commit
fa52d8ba74
2 changed files with 5 additions and 9 deletions
  1. 4
    4
      tmk_core/protocol/chibios/usb_main.c
  2. 1
    5
      tmk_core/protocol/chibios/usb_main.h

+ 4
- 4
tmk_core/protocol/chibios/usb_main.c View File

@@ -33,9 +33,9 @@
* ---------------------------------------------------------
*/

uint8_t keyboard_idle = 0;
uint8_t keyboard_protocol = 1;
uint16_t keyboard_led_stats = 0;
uint8_t keyboard_idle __attribute__((aligned(2))) = 0;
uint8_t keyboard_protocol __attribute__((aligned(2))) = 1;
uint16_t keyboard_led_stats __attribute__((aligned(2))) = 0;
volatile uint16_t keyboard_idle_count = 0;
static virtual_timer_t keyboard_idle_timer;
static void keyboard_idle_timer_cb(void *arg);
@@ -1350,7 +1350,7 @@ int8_t sendchar(uint8_t c) {
return 0;
}
osalSysUnlock();
/* Timeout after 5us if the queue is full.
/* Timeout after 100us if the queue is full.
* Increase this timeout if too much stuff is getting
* dropped (i.e. the buffer is getting full too fast
* for USB/HIDRAW to dequeue). Another possibility

+ 1
- 5
tmk_core/protocol/chibios/usb_main.h View File

@@ -58,9 +58,6 @@ void send_remote_wakeup(USBDriver *usbp);
#define NKRO_REPORT_KEYS (NKRO_EPSIZE - 1)
#endif

/* this defines report_keyboard_t and computes REPORT_SIZE defines */
// #include "report.h"

/* extern report_keyboard_t keyboard_report_sent; */

/* keyboard IN request callback handler */
@@ -122,8 +119,7 @@ typedef struct {
#define CONSOLE_EPSIZE 16

/* Number of IN reports that can be stored inside the output queue */
#define CONSOLE_QUEUE_CAPACITY 2
#define CONSOLE_QUEUE_BUFFER_SIZE (CONSOLE_QUEUE_CAPACITY * CONSOLE_EPSIZE)
#define CONSOLE_QUEUE_CAPACITY 4

/* Console flush time */
#define CONSOLE_FLUSH_MS 50

Loading…
Cancel
Save