qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.01k stars 38.72k forks source link

Brightness level of leds #1136

Closed mystcreater closed 7 years ago

mystcreater commented 7 years ago

Hi,

Like in the default keymap of my Ergodox EZ keyboard, I have in my keymap a function that provides the ability to bring lights on or off depending on the layer where I am. Is there any way to set the level of brightness of these leds?

h-youhei commented 7 years ago
void matrix_init_user(void) {
    ergodox_led_all_set( brigntness_level );
};

You can set brightness_level 15(LED_BRIGHTNESS_LO) to 255(LED_BRIGHTNESS_HI).

Reference

mystcreater commented 7 years ago

Thank you very much.