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.

29 lines
675 B

  1. #include "stanrc85.h"
  2. static uint8_t middle = 0;
  3. static uint8_t bottom = 0;
  4. layer_state_t layer_state_set_user(layer_state_t state) {
  5. middle = bottom = 0;
  6. switch (get_highest_layer(state)) {
  7. case _FN1_60:
  8. middle = 1;
  9. break;
  10. case _FN2_60:
  11. bottom = 1;
  12. break;
  13. case _DEFAULT:
  14. middle = 1;
  15. bottom = 1;
  16. break;
  17. default: // for any other layers, or the default layer
  18. break;
  19. }
  20. return state;
  21. }
  22. bool led_update_user(led_t led_state) {
  23. writePin(INDICATOR_PIN_0, !led_state.caps_lock);
  24. writePin(INDICATOR_PIN_1, !middle);
  25. writePin(INDICATOR_PIN_2, !bottom);
  26. return false;
  27. }