rev2.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef REV2_H
  2. #define REV2_H
  3. #include "../lets_split.h"
  4. //void promicro_bootloader_jmp(bool program);
  5. #include "quantum.h"
  6. #ifdef USE_I2C
  7. #include <stddef.h>
  8. #ifdef __AVR__
  9. #include <avr/io.h>
  10. #include <avr/interrupt.h>
  11. #endif
  12. #ifdef SSD1306OLED
  13. extern bool iota_gfx_init(void);
  14. extern void iota_gfx_task(void);
  15. extern bool iota_gfx_off(void);
  16. extern bool iota_gfx_on(void);
  17. extern void iota_gfx_flush(void);
  18. extern void iota_gfx_write_char(uint8_t c);
  19. extern void iota_gfx_write(const char *data);
  20. extern void iota_gfx_write_P(const char *data);
  21. extern void iota_gfx_clear_screen(void);
  22. #endif
  23. #endif
  24. //void promicro_bootloader_jmp(bool program);
  25. #ifndef FLIP_HALF
  26. // Standard Keymap
  27. // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left)
  28. #define KEYMAP( \
  29. L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
  30. L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
  31. L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
  32. L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
  33. ) \
  34. { \
  35. { L00, L01, L02, L03, L04, L05 }, \
  36. { L10, L11, L12, L13, L14, L15 }, \
  37. { L20, L21, L22, L23, L24, L25 }, \
  38. { L30, L31, L32, L33, L34, L35 }, \
  39. { R05, R04, R03, R02, R01, R00 }, \
  40. { R15, R14, R13, R12, R11, R10 }, \
  41. { R25, R24, R23, R22, R21, R20 }, \
  42. { R35, R34, R33, R32, R31, R30 } \
  43. }
  44. #else
  45. // Keymap with right side flipped
  46. // (TRRS jack on both halves are to the right)
  47. #define KEYMAP( \
  48. L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
  49. L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
  50. L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
  51. L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \
  52. ) \
  53. { \
  54. { L00, L01, L02, L03, L04, L05 }, \
  55. { L10, L11, L12, L13, L14, L15 }, \
  56. { L20, L21, L22, L23, L24, L25 }, \
  57. { L30, L31, L32, L33, L34, L35 }, \
  58. { R00, R01, R02, R03, R04, R05 }, \
  59. { R10, R11, R12, R13, R14, R15 }, \
  60. { R20, R21, R22, R23, R24, R25 }, \
  61. { R30, R31, R32, R33, R34, R35 } \
  62. }
  63. #endif
  64. #endif