summaryrefslogtreecommitdiff
path: root/usb_keyboard.h
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2011-02-09 00:03:58 +0900
committertmk <nobody@nowhere>2011-02-22 03:08:59 +0900
commitacc974c64b1e17e6807133fdc50de5bb34aedda5 (patch)
tree7af7511a56d680a4d93b535c52891a8ffc15dd04 /usb_keyboard.h
parent5552b5afeaa9ce7432f9ded3586984253f292d80 (diff)
downloadqmk_firmware-acc974c64b1e17e6807133fdc50de5bb34aedda5.tar.gz
qmk_firmware-acc974c64b1e17e6807133fdc50de5bb34aedda5.zip
added protocol stack: pjrc, vusb
Diffstat (limited to 'usb_keyboard.h')
-rw-r--r--usb_keyboard.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/usb_keyboard.h b/usb_keyboard.h
deleted file mode 100644
index 141efc97a6..0000000000
--- a/usb_keyboard.h
+++ /dev/null
@@ -1,93 +0,0 @@
-#ifndef USB_KEYBOARD_H
-#define USB_KEYBOARD_H 1
-
-#include <stdint.h>
-#include <stdbool.h>
-#include "usb.h"
-
-
-#define KBD_INTERFACE 0
-#define KBD_ENDPOINT 1
-#define KBD_SIZE 8
-#define KBD_BUFFER EP_DOUBLE_BUFFER
-#define KBD_REPORT_KEYS (KBD_SIZE - 2)
-
-// secondary keyboard
-#ifdef USB_NKRO_ENABLE
-#define KBD2_INTERFACE 4
-#define KBD2_ENDPOINT 5
-#define KBD2_SIZE 16
-#define KBD2_BUFFER EP_DOUBLE_BUFFER
-#define KBD2_REPORT_KEYS (KBD2_SIZE - 1)
-#endif
-
-#if defined(KBD2_REPORT_KEYS) && KBD2_REPORT_KEYS > KBD_REPORT_KEYS
-#define KEYS_MAX KBD2_REPORT_KEYS
-#else
-#define KEYS_MAX KBD_REPORT_KEYS
-#endif
-
-#define BIT_LCTRL (1<<0)
-#define BIT_LSHIFT (1<<1)
-#define BIT_LALT (1<<2)
-#define BIT_LGUI (1<<3)
-#define BIT_RCTRL (1<<4)
-#define BIT_RSHIFT (1<<5)
-#define BIT_RALT (1<<6)
-#define BIT_RGUI (1<<7)
-#define BIT_LCTL BIT_LCTRL
-#define BIT_RCTL BIT_RCTRL
-#define BIT_LSFT BIT_LSHIFT
-#define BIT_RSFT BIT_RSHIFT
-
-typedef struct report {
- uint8_t keys[KEYS_MAX];
- uint8_t mods;
- bool is_sent;
-} usb_keyboard_report_t;
-
-
-#define usb_keyboard_keys usb_keyboard_report->keys
-#define usb_keyboard_mods usb_keyboard_report->mods
-#define usb_keyboard_keys_prev usb_keyboard_report_prev->keys
-#define usb_keyboard_mods_prev usb_keyboard_report_prev->mods
-
-
-extern usb_keyboard_report_t *usb_keyboard_report;
-extern usb_keyboard_report_t *usb_keyboard_report_prev;
-extern uint8_t usb_keyboard_protocol;
-extern uint8_t usb_keyboard_idle_config;
-extern uint8_t usb_keyboard_idle_count;
-extern volatile uint8_t usb_keyboard_leds;
-extern bool usb_keyboard_nkro;
-
-
-int8_t usb_keyboard_send(void);
-int8_t usb_keyboard_send_report(usb_keyboard_report_t *report);
-
-void usb_keyboard_swap_report(void);
-
-void usb_keyboard_clear_report(void);
-void usb_keyboard_clear_keys(void);
-void usb_keyboard_clear_mods(void);
-
-void usb_keyboard_set_keys(uint8_t *keys);
-void usb_keyboard_set_mods(uint8_t mods);
-
-void usb_keyboard_add_code(uint8_t code);
-void usb_keyboard_add_key(uint8_t code);
-void usb_keyboard_add_mod(uint8_t code);
-
-void usb_keyboard_del_code(uint8_t code);
-void usb_keyboard_del_key(uint8_t code);
-void usb_keyboard_del_mod(uint8_t code);
-
-bool usb_keyboard_is_sent(void);
-bool usb_keyboard_has_key(void);
-bool usb_keyboard_has_mod(void);
-
-uint8_t usb_keyboard_get_key(void);
-
-void usb_keyboard_print_report(usb_keyboard_report_t *report);
-
-#endif