Skip to content

Instantly share code, notes, and snippets.

@jaygreco
Last active November 7, 2020 22:57
Show Gist options
  • Select an option

  • Save jaygreco/a65328cbf32819f05ec0d86e33e41d69 to your computer and use it in GitHub Desktop.

Select an option

Save jaygreco/a65328cbf32819f05ec0d86e33e41d69 to your computer and use it in GitHub Desktop.
NIBBLE Big LED Example
// The following example shows caps lock status using the big LED instead of the Bit-C LED.
// Add this to the existing code in nibble.c, or in the keymap.c file.
// Uncomment the commented lines to restore bit-c LED (disabled in this example by default)
// Import the Big LED code at the top of the file
#include QMK_KEYBOARD_H
// #include "bitc_led.h"
#include "big_led.h"
// This function is a defult QMK function. It checks the status of CAPS/NUM/SCROLL lock.
// Use Bit-C or Big LED to show CAPS LOCK status
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if (res) {
set_big_LED_r(led_state.caps_lock ? LED_ON : LED_OFF);
// set_bitc_LED(led_state.caps_lock ? LED_DIM : LED_OFF);
}
return res;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment