Keyboard firmwares for Atmel AVR and Cortex-M
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.h 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef CONFIG_H
  2. #define CONFIG_H
  3. #define VENDOR_ID 0xFEED
  4. #define PRODUCT_ID 0x6512
  5. #define MANUFACTURER t.m.k.
  6. #define PRODUCT PS/2 keyboard converter
  7. #define DESCRIPTION convert PS/2 keyboard to USB
  8. /* matrix size */
  9. #define MATRIX_ROWS 32 // keycode bit: 3-0
  10. #define MATRIX_COLS 8 // keycode bit: 6-4
  11. /* define if matrix has ghost */
  12. //#define MATRIX_HAS_GHOST
  13. /* USB NKey Rollover */
  14. #ifdef USB_NKRO_ENABLE
  15. #endif
  16. /* mouse keys */
  17. #ifdef MOUSEKEY_ENABLE
  18. # define MOUSEKEY_DELAY_TIME 255
  19. #endif
  20. /* PS/2 lines */
  21. #define PS2_CLOCK_PORT PORTD
  22. #define PS2_CLOCK_PIN PIND
  23. #define PS2_CLOCK_DDR DDRD
  24. #define PS2_CLOCK_BIT 3
  25. #define PS2_DATA_PORT PORTD
  26. #define PS2_DATA_PIN PIND
  27. #define PS2_DATA_DDR DDRD
  28. #define PS2_DATA_BIT 7
  29. /* External interrupt for PS/2 clock line (optional) */
  30. #define PS2_INT_ENABLE() do { \
  31. EIMSK |= (1<<INT1); \
  32. EICRA |= ((1<<ISC11) | (0<<ISC10)); \
  33. EIFR |= (1<<INTF1); \
  34. } while (0)
  35. #define PS2_INT_DISABLE() do { \
  36. EIMSK &= ~(1<<INT1); \
  37. } while (0)
  38. #define PS2_INT_VECT INT1_vect
  39. /* Pin Change interrupt for PS/2 clock line (optional)
  40. #define PS2_INT_ENABLE() do { \
  41. PCMSK2 |= (1<<PCINT22); \
  42. PCICR |= (1<<PCIE2); \
  43. PCIFR |= (1<<PCIF2); \
  44. } while (0)
  45. #define PS2_INT_DISABLE() do { \
  46. PCMSK2 &= ~(1<<PCINT22); \
  47. PCICR &= ~(1<<PCIE); \
  48. } while (0)
  49. #define PS2_INT_VECT PCINT2_vect
  50. */
  51. #endif