Browse Source

fixed a bug on host_system_send().

tags/v1.9
tmk 12 years ago
parent
commit
7386c76191
5 changed files with 9 additions and 3 deletions
  1. 1
    1
      adb_usb/Makefile
  2. 1
    0
      adb_usb/config.h
  3. 1
    0
      hhkb/config_pjrc.h
  4. 1
    1
      host.c
  5. 5
    1
      pjrc/usb.c

+ 1
- 1
adb_usb/Makefile View File

# #
#MOUSEKEY_ENABLE = yes # Mouse keys #MOUSEKEY_ENABLE = yes # Mouse keys
#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support #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 #NKRO_ENABLE = yes # USB Nkey Rollover





+ 1
- 0
adb_usb/config.h View File



#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x0ADB #define PRODUCT_ID 0x0ADB
#define DEVICE_VER 0x0101
#define MANUFACTURER t.m.k. #define MANUFACTURER t.m.k.
#define PRODUCT ADB keyboard converter #define PRODUCT ADB keyboard converter
#define DESCRIPTION convert ADB keyboard to USB #define DESCRIPTION convert ADB keyboard to USB

+ 1
- 0
hhkb/config_pjrc.h View File



#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
#define PRODUCT_ID 0xCAFE #define PRODUCT_ID 0xCAFE
#define DEVICE_VER 0x0101
#define MANUFACTURER t.m.k. #define MANUFACTURER t.m.k.
#define PRODUCT HHKB mod #define PRODUCT HHKB mod
#define DESCRIPTION t.m.k. keyboard firmware for HHKB mod #define DESCRIPTION t.m.k. keyboard firmware for HHKB mod

+ 1
- 1
host.c View File

void host_system_send(uint16_t data) void host_system_send(uint16_t data)
{ {
if (!driver) return; if (!driver) return;
(*driver->send_consumer)(data);
(*driver->send_system)(data);
} }


void host_consumer_send(uint16_t data) void host_consumer_send(uint16_t data)

+ 5
- 1
pjrc/usb.c View File

# define PRODUCT_ID 0xBABE # define PRODUCT_ID 0xBABE
#endif #endif


#ifndef DEVICE_VER
# define DEVICE_VER 0x0100
#endif



// USB devices are supposed to implment a halt feature, which is // USB devices are supposed to implment a halt feature, which is
// rarely (if ever) used. If you comment this line out, the halt // rarely (if ever) used. If you comment this line out, the halt
ENDPOINT0_SIZE, // bMaxPacketSize0 ENDPOINT0_SIZE, // bMaxPacketSize0
LSB(VENDOR_ID), MSB(VENDOR_ID), // idVendor LSB(VENDOR_ID), MSB(VENDOR_ID), // idVendor
LSB(PRODUCT_ID), MSB(PRODUCT_ID), // idProduct LSB(PRODUCT_ID), MSB(PRODUCT_ID), // idProduct
0x00, 0x01, // bcdDevice
LSB(DEVICE_VER), MSB(DEVICE_VER), // bcdDevice
1, // iManufacturer 1, // iManufacturer
2, // iProduct 2, // iProduct
0, // iSerialNumber 0, // iSerialNumber

Loading…
Cancel
Save