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.

32 lines
1.2 KiB

  1. #pragma once
  2. #include "quantum.h"
  3. #define RED_LED_OFF() writePinHigh(F6)
  4. #define RED_LED_ON() writePinLow(F6)
  5. #define BLU_LED_OFF() writePinHigh(F5)
  6. #define BLU_LED_ON() writePinLow(F5)
  7. #define GRN_LED_OFF() writePinHigh(D1)
  8. #define GRN_LED_ON() writePinLow(D1)
  9. #define SET_LED_OFF (RED_LED_OFF(); GRN_LED_OFF(); BLU_LED_OFF(); )
  10. #define SET_LED_RED (RED_LED_ON(); GRN_LED_OFF(); BLU_LED_OFF(); )
  11. #define SET_LED_BLUE (RED_LED_OFF(); GRN_LED_OFF(); BLU_LED_ON(); )
  12. #define SET_LED_GREEN (RED_LED_OFF(); GRN_LED_ON(); BLU_LED_OFF(); )
  13. #define SET_LED_YELLOW (RED_LED_ON(); GRN_LED_ON(); BLU_LED_OFF(); )
  14. #define SET_LED_MAGENTA (RED_LED_ON(); GRN_LED_OFF(); BLU_LED_ON(); )
  15. #define SET_LED_CYAN (RED_LED_OFF(); GRN_LED_ON(); BLU_LED_ON(); )
  16. #define SET_LED_WHITE (RED_LED_ON(); GRN_LED_ON(); BLU_LED_ON(); )
  17. // This a shortcut to help you visually see your layout.
  18. // The first section contains all of the arguements
  19. // The second converts the arguments into a two-dimensional array
  20. #define LAYOUT( \
  21. k13, k14, k15, k16, \
  22. k09, k10, k11, k12, \
  23. k05, k06, k07, k08, \
  24. k01, k02, k03, k04 \
  25. ) \
  26. { \
  27. { k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, k16 } \
  28. }