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.

67 lines
3.2 KiB

[Keyboard] Add new keyboard ColorLice (#7536) * [Keyboard] Add new keyboard Symmetry60 * Add new keyboard Symmetry60 * Fix Typo * Update keyboards/handwired/symmetry60/config.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/handwired/symmetry60/rules.mk Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/symmetry60/symmetry60.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/symmetry60/symmetry60.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/symmetry60/symmetry60.h Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update readme.md * Update keymap.c * Update keymap.c * Update keymap.c * Update rules.mk * Update symmetry60.c * Update keyboards/handwired/symmetry60/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Add ColorLice * Update ColorLice - Adjust info.json to support Configurator - Adjust layout name to fit with info.json - Seperate 2 feature: RGB Switch and RGB Underglow * Update new way of control lock leds * Remove #ifndef COLORLICE_H * Update make example * Revert Helix * Revert Helix * Revert Helix * Revert Helix * Update keyboards/handwired/colorlice/colorlice.h Co-Authored-By: Joel Challis <git@zvecr.com> * Update keyboards/handwired/colorlice/colorlice.h Co-Authored-By: Joel Challis <git@zvecr.com> * Update default keymap * Revert Helix * Update keyboards/handwired/colorlice/readme.md Co-Authored-By: Joel Challis <git@zvecr.com> * Update keyboards/handwired/colorlice/rules.mk Co-Authored-By: Joel Challis <git@zvecr.com> * Update keyboards/handwired/colorlice/colorlice.c Co-Authored-By: Drashna Jaelre <drashna@live.com> * Update keyboards/handwired/colorlice/colorlice.c Co-Authored-By: Drashna Jaelre <drashna@live.com> * Remove unnecessary function * Update keyboards/handwired/colorlice/colorlice.c Co-Authored-By: Drashna Jaelre <drashna@live.com> * Adjust rules option for working with Configurator - Move RGB_MATRIX_ENABLE and RGBLIGHT_ENABLE to keyboard rule. - Add RGB_DI_PIN in keyboard config * Update keyboards/helix/rev2/keymaps/default/keymap.c Co-Authored-By: Joel Challis <git@zvecr.com> * Update keyboards/handwired/colorlice/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keymap for Colorlice * Adjust rules.mk to use space indent
4 years ago
  1. /* Copyright 2019 marhalloweenvt
  2. *
  3. * This program is free software: you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation, either version 2 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License
  14. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "colorlice.h"
  17. #ifdef RGB_MATRIX_ENABLE
  18. led_config_t g_led_config = { {
  19. { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
  20. { 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, NO_LED },
  21. { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, NO_LED },
  22. { 58, 57, 56, 55, 54, 53, NO_LED, 52, 51, 50, 49, 48, 47, 46, 45, NO_LED},
  23. { 59, NO_LED, 60, 61, 62, NO_LED, NO_LED,63, NO_LED, NO_LED, 64, 65,66,67, 68, NO_LED }
  24. }, {
  25. { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 195, 0 }, { 210, 0 }, { 224, 0 },
  26. { 224, 16 }, { 210, 16 }, { 195, 16 }, { 180, 16 }, { 165, 16 }, { 150, 16 }, { 135, 16 }, { 120, 16 }, { 90, 16 }, { 75, 16 }, { 60, 16 }, { 45, 16 }, { 30, 16 }, { 15, 16 }, { 0, 16 },
  27. { 0, 32 }, { 15, 32 }, { 30, 32 }, { 45, 32 }, { 60, 32 }, { 75, 32 }, { 90, 32 }, { 135, 32 }, { 150, 32 }, { 165, 32 }, { 180, 32 }, { 195, 32 }, { 210, 32 }, { 224, 32 },
  28. { 225, 48 }, { 224, 48 }, { 210, 48 }, { 195, 48 }, { 180, 48 }, { 165, 48 }, { 150, 48 }, { 135, 48 }, { 90, 48 }, { 75, 48 }, { 60, 48 }, { 45, 48 }, { 30, 48 }, { 15, 48 },
  29. { 15, 64 }, { 45, 64 }, { 75, 64 }, { 90, 64 }, { 150, 64 }, { 180, 64 }, { 210, 64 }, { 215, 64 }, { 220, 64 }, { 225, 64 }
  30. }, {
  31. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  32. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  33. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  34. 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
  35. 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
  36. } };
  37. #endif
  38. #ifdef RGB_MATRIX_ENABLE
  39. void suspend_power_down_kb(void)
  40. {
  41. rgb_matrix_set_suspend_state(true);
  42. suspend_power_down_user();
  43. }
  44. void suspend_wakeup_init_kb(void)
  45. {
  46. rgb_matrix_set_suspend_state(false);
  47. suspend_wakeup_init_user();
  48. }
  49. #endif
  50. bool led_update_kb(led_t led_state) {
  51. bool res = led_update_user(led_state);
  52. if(res) {
  53. // writePin sets the pin high for 1 and low for 0.
  54. // In this example the pins are inverted, setting
  55. // it low/0 turns it on, and high/1 turns the LED off.
  56. // This behavior depends on whether the LED is between the pin
  57. // and VCC or the pin and GND.
  58. writePin(B2, !led_state.num_lock);
  59. writePin(C6, !led_state.caps_lock);
  60. writePin(B7, !led_state.scroll_lock);
  61. }
  62. return res;
  63. }