summaryrefslogtreecommitdiff
path: root/usb.c
diff options
context:
space:
mode:
authortmk2010-10-27 20:51:45 +0900
committertmk2010-10-27 22:56:01 +0900
commit2f80e790c6310ad24a4cb3d4a72c31314364fef7 (patch)
treeaad001abdb61ff736e580f98184ab7cd9e870648 /usb.c
parent461e0d3d8c82cc78d29d3115af3c417bb51bb50f (diff)
new build method for macway
Diffstat (limited to 'usb.c')
-rw-r--r--usb.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/usb.c b/usb.c
index f5905f2ee..5c3240a47 100644
--- a/usb.c
+++ b/usb.c
@@ -29,6 +29,7 @@
#include "usb_mouse.h"
#include "usb_debug.h"
#include "print.h"
+#include "util.h"
/**************************************************************************
@@ -38,16 +39,29 @@
**************************************************************************/
// You can change these to give your code its own name.
-#define STR_MANUFACTURER L"t.m.k."
-#define STR_PRODUCT L"t.m.k. keyboard"
+#ifndef MANUFACTURER
+# define STR_MANUFACTURER L"t.m.k."
+#else
+# define STR_MANUFACTURER LSTR(MANUFACTURER)
+#endif
+#ifndef PRODUCT
+# define STR_PRODUCT L"t.m.k. keyboard"
+#else
+# define STR_PRODUCT LSTR(PRODUCT)
+#endif
// Mac OS-X and Linux automatically load the correct drivers. On
// Windows, even though the driver is supplied by Microsoft, an
// INF file is needed to load the driver. These numbers need to
// match the INF file.
-#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0xCAFE
+#ifndef VENDOR_ID
+# define VENDOR_ID 0xFEED
+#endif
+
+#ifndef PRODUCT_ID
+# define PRODUCT_ID 0xBABE
+#endif
// USB devices are supposed to implment a halt feature, which is