858fe883fb81599d2b054e9b8fec7ddd119a0f89
[tmk_keyboard.git] / ps2_vusb / config.h
1 #ifndef CONFIG_H
2 #define CONFIG_H
3
4
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
10
11 /* matrix size */
12 #define MATRIX_ROWS 32 // keycode bit: 3-0
13 #define MATRIX_COLS 8 // keycode bit: 6-4
14
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) \
19 )
20
21
22 /* USB NKey Rollover */
23 #ifdef USB_NKRO_ENABLE
24 #endif
25
26 /* mouse keys */
27 #ifdef MOUSEKEY_ENABLE
28 # define MOUSEKEY_DELAY_TIME 255
29 #endif
30
31
32 /* PS/2 lines */
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
41
42 /* External interrupt for PS/2 clock line (optional) */
43 #define PS2_INT_ENABLE() do { \
44 EIMSK |= (1<<INT1); \
45 EICRA |= ((1<<ISC11) | (0<<ISC10)); \
46 EIFR |= (1<<INTF1); \
47 } while (0)
48
49 #define PS2_INT_DISABLE() do { \
50 EIMSK &= ~(1<<INT1); \
51 } while (0)
52 #define PS2_INT_VECT INT1_vect
53
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); \
59 } while (0)
60
61 #define PS2_INT_DISABLE() do { \
62 PCMSK2 &= ~(1<<PCINT22); \
63 PCICR &= ~(1<<PCIE); \
64 } while (0)
65 #define PS2_INT_VECT PCINT2_vect
66 */
67
68 #endif
Imprint / Impressum