summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2012-08-27 15:18:01 +0900
committertmk <nobody@nowhere>2012-08-28 21:56:15 +0900
commite7c030375ac76907206db7f09cf9208b0c7c6e66 (patch)
tree8260eec8ca2fcd2124c210a8488d51dd0ae8afaf /common
parentc5060ea81942b0e3f8577536ff78402a19abe3d3 (diff)
downloadqmk_firmware-e7c030375ac76907206db7f09cf9208b0c7c6e66.tar.gz
qmk_firmware-e7c030375ac76907206db7f09cf9208b0c7c6e66.zip
Add USB to USB converter. unmature.
Diffstat (limited to 'common')
-rw-r--r--common/report.h9
-rw-r--r--common/usb_keycodes.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/common/report.h b/common/report.h
index 45f5c0b881..a73e0aba18 100644
--- a/common/report.h
+++ b/common/report.h
@@ -78,6 +78,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define REPORT_KEYS 6
#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
uint8_t mods;
uint8_t rserved;
@@ -92,4 +97,8 @@ typedef struct {
int8_t h;
} __attribute__ ((packed)) report_mouse_t;
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/common/usb_keycodes.h b/common/usb_keycodes.h
index 9b6cce1532..04b398fa2a 100644
--- a/common/usb_keycodes.h
+++ b/common/usb_keycodes.h
@@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define IS_ERROR(code) (KB_ROLL_OVER <= (code) && (code) <= KB_UNDEFINED)
+#define IS_ANY(code) (KB_A <= (code))
#define IS_KEY(code) (KB_A <= (code) && (code) <= KB_EXSEL)
#define IS_MOD(code) (KB_LCTRL <= (code) && (code) <= KB_RGUI)
#define IS_FN(code) (KB_FN0 <= (code) && (code) <= KB_FN7)