logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

xd75.c (1637B)


  1. /* Copyright 2017 Benjamin Kesselring
  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 "xd75.h"
  17. #define XD75_CAPSLOCK_LED B2
  18. #define XD75_GP103_LED F4
  19. #define XD75_GP100_LED F7
  20. void matrix_init_kb(void) {
  21. capslock_led_init();
  22. gp100_led_init();
  23. gp103_led_init();
  24. matrix_init_user();
  25. }
  26. void capslock_led_init(void) {
  27. gpio_set_pin_output(XD75_CAPSLOCK_LED);
  28. capslock_led_off();
  29. }
  30. void capslock_led_off(void) {
  31. gpio_write_pin_high(XD75_CAPSLOCK_LED);
  32. }
  33. void capslock_led_on(void) {
  34. gpio_write_pin_low(XD75_CAPSLOCK_LED);
  35. }
  36. void gp100_led_init(void) {
  37. gpio_set_pin_output(XD75_GP100_LED);
  38. gp100_led_off();
  39. }
  40. void gp100_led_off(void) {
  41. gpio_write_pin_high(XD75_GP100_LED);
  42. }
  43. void gp100_led_on(void) {
  44. gpio_write_pin_low(XD75_GP100_LED);
  45. }
  46. void gp103_led_init(void) {
  47. gpio_set_pin_output(XD75_GP103_LED);
  48. gp103_led_off();
  49. }
  50. void gp103_led_off(void) {
  51. gpio_write_pin_low(XD75_GP103_LED);
  52. }
  53. void gp103_led_on(void) {
  54. gpio_write_pin_high(XD75_GP103_LED);
  55. }