summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2011-12-22 01:05:28 +0900
committertmk <nobody@nowhere>2011-12-22 01:05:28 +0900
commit7386c761912530bbb53496002ab32d02c8a86833 (patch)
treed974c9f82f4db2434ac26357f4f3e38a2d4f6777
parentbaf885dc31e1d4ac98e03870dffea6e19c259427 (diff)
fixed a bug on host_system_send().
-rw-r--r--adb_usb/Makefile2
-rw-r--r--adb_usb/config.h1
-rw-r--r--hhkb/config_pjrc.h1
-rw-r--r--host.c2
-rw-r--r--pjrc/usb.c6
5 files changed, 9 insertions, 3 deletions
diff --git a/adb_usb/Makefile b/adb_usb/Makefile
index 56b342df94..f4c5031cb6 100644
--- a/adb_usb/Makefile
+++ b/adb_usb/Makefile
@@ -38,7 +38,7 @@ F_CPU = 16000000
#
#MOUSEKEY_ENABLE = yes # Mouse keys
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
-#EXTRAKEY_ENABLE = yes # Audio control and System control
+EXTRAKEY_ENABLE = yes # Audio control and System control
#NKRO_ENABLE = yes # USB Nkey Rollover
diff --git a/adb_usb/config.h b/adb_usb/config.h
index 6431ede4cf..52d5925a50 100644
--- a/adb_usb/config.h
+++ b/adb_usb/config.h
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0ADB
+#define DEVICE_VER 0x0101
#define MANUFACTURER t.m.k.
#define PRODUCT ADB keyboard converter
#define DESCRIPTION convert ADB keyboard to USB
diff --git a/hhkb/config_pjrc.h b/hhkb/config_pjrc.h
index 8379202ca8..fffe3522c7 100644
--- a/hhkb/config_pjrc.h
+++ b/hhkb/config_pjrc.h
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0xCAFE
+#define DEVICE_VER 0x0101
#define MANUFACTURER t.m.k.
#define PRODUCT HHKB mod
#define DESCRIPTION t.m.k. keyboard firmware for HHKB mod
diff --git a/host.c b/host.c
index 65b5ddcbb3..c5383ed424 100644
--- a/host.c
+++ b/host.c
@@ -142,7 +142,7 @@ void host_mouse_send(report_mouse_t *report)
void host_system_send(uint16_t data)
{
if (!driver) return;
- (*driver->send_consumer)(data);
+ (*driver->send_system)(data);
}
void host_consumer_send(uint16_t data)
diff --git a/pjrc/usb.c b/pjrc/usb.c
index 9989a4b2d9..20afc1b883 100644
--- a/pjrc/usb.c
+++ b/pjrc/usb.c
@@ -66,6 +66,10 @@
# define PRODUCT_ID 0xBABE
#endif
+#ifndef DEVICE_VER
+# define DEVICE_VER 0x0100
+#endif
+
// USB devices are supposed to implment a halt feature, which is
// rarely (if ever) used. If you comment this line out, the halt
@@ -134,7 +138,7 @@ static uint8_t PROGMEM device_descriptor[] = {
ENDPOINT0_SIZE, // bMaxPacketSize0
LSB(VENDOR_ID), MSB(VENDOR_ID), // idVendor
LSB(PRODUCT_ID), MSB(PRODUCT_ID), // idProduct
- 0x00, 0x01, // bcdDevice
+ LSB(DEVICE_VER), MSB(DEVICE_VER), // bcdDevice
1, // iManufacturer
2, // iProduct
0, // iSerialNumber