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.

48 lines
2.3 KiB

  1. /* Copyright 2018 MechMerlin
  2. * This program is free software: you can redistribute it and/or modify
  3. * it under the terms of the GNU General Public License as published by
  4. * the Free Software Foundation, either version 2 of the License, or
  5. * (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #pragma once
  16. #include "quantum.h"
  17. // Functions for setting LEDs on toggle keys
  18. inline void caps_led_on(void) { DDRD |= (1<<7); PORTD &= ~(1<<7); }
  19. inline void caps_led_off(void) { DDRD &= ~(1<<7); PORTD &= ~(1<<7); }
  20. inline void num_led_on(void) { DDRD |= (1<<6); PORTD &= ~(1<<6); }
  21. inline void num_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); }
  22. #define XXX KC_NO
  23. // This a shortcut to help you visually see your layout.
  24. // The following is an example using the Planck MIT layout
  25. // The first section contains all of the arguments
  26. // The second converts the arguments into a two-dimensional array
  27. #define LAYOUT( \
  28. k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \
  29. k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \
  30. k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \
  31. k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
  32. k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4E, k4F, \
  33. k50, k51, k53, k56, k5A, k5B, k5D, k5E, k5F \
  34. ) { \
  35. { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
  36. { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \
  37. { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \
  38. { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \
  39. { XXX, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, k4E, k4F }, \
  40. { k50, k51, XXX, k53, XXX, XXX, k56, XXX, XXX, XXX, k5A, k5B, XXX, k5D, k5E, k5F } \
  41. }