5 #define VENDOR_ID 0xFEED
6 #define PRODUCT_ID 0x6512
7 #define MANUFACTURER t.m.k.
8 #define PRODUCT PS/2 keyboard converter
9 #define DESCRIPTION convert PS/2 keyboard to USB
12 #define MATRIX_ROWS 32 // keycode bit: 3-0
13 #define MATRIX_COLS 8 // keycode bit: 6-4
15 /* key combination for command */
16 #define IS_COMMAND() ( \
17 keyboard_report->mods == (BIT_LSHIFT | BIT_RSHIFT) || \
18 keyboard_report->mods == (BIT_LCTRL | BIT_RSHIFT) \
22 /* USB NKey Rollover */
23 #ifdef USB_NKRO_ENABLE
27 #ifdef MOUSEKEY_ENABLE
28 # define MOUSEKEY_DELAY_TIME 255
33 #define PS2_CLOCK_PORT PORTD
34 #define PS2_CLOCK_PIN PIND
35 #define PS2_CLOCK_DDR DDRD
36 #define PS2_CLOCK_BIT 3
37 #define PS2_DATA_PORT PORTD
38 #define PS2_DATA_PIN PIND
39 #define PS2_DATA_DDR DDRD
40 #define PS2_DATA_BIT 7
42 /* External interrupt for PS/2 clock line (optional) */
43 #define PS2_INT_ENABLE() do { \
45 EICRA |= ((1<<ISC11) | (0<<ISC10)); \
49 #define PS2_INT_DISABLE() do { \
50 EIMSK &= ~(1<<INT1); \
52 #define PS2_INT_VECT INT1_vect
54 /* Pin Change interrupt for PS/2 clock line (optional)
55 #define PS2_INT_ENABLE() do { \
56 PCMSK2 |= (1<<PCINT22); \
57 PCICR |= (1<<PCIE2); \
58 PCIFR |= (1<<PCIF2); \
61 #define PS2_INT_DISABLE() do { \
62 PCMSK2 &= ~(1<<PCINT22); \
63 PCICR &= ~(1<<PCIE); \
65 #define PS2_INT_VECT PCINT2_vect