~ruther/qmk_firmware

f00402a2f3d551bcb1fb87245238e2b392192eb5 — Joel Challis 4 years ago e1e13c5
Refactor to use led config - Part 3 (#10966)

* Refactor to use led config

* Refactor to use led config

* Refactor to use led config

* Refactor to use led config
M keyboards/1upkeyboards/sweet16/v1/config.h => keyboards/1upkeyboards/sweet16/v1/config.h +6 -0
@@ 17,6 17,12 @@
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

#ifndef CONVERT_TO_PROTON_C
#    define LED_NUM_LOCK_PIN B0 // RXLED
#    define LED_CAPS_LOCK_PIN D5 // TXLED
#    define LED_PIN_ON_STATE 0
#endif

/* Underglow options */
#define RGB_DI_PIN B1
#ifdef RGB_DI_PIN

M keyboards/1upkeyboards/sweet16/v1/v1.c => keyboards/1upkeyboards/sweet16/v1/v1.c +0 -20
@@ 1,21 1,1 @@
#include "v1.h"

void led_set_kb(uint8_t usb_led) {
#ifndef CONVERT_TO_PROTON_C
    /* Map RXLED to USB_LED_NUM_LOCK */
    if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
        setPinOutput(B0);
        writePinLow(B0);
    } else {
        setPinInput(B0);
    }

    /* Map TXLED to USB_LED_CAPS_LOCK */
    if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
        setPinOutput(D5);
        writePinLow(D5);
    } else {
        setPinInput(D5);
    }
#endif
}

M keyboards/alps64/alps64.c => keyboards/alps64/alps64.c +0 -20
@@ 15,23 15,3 @@ You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
#include "alps64.h"

void keyboard_pre_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up
    setPinOutput(C5);
    keyboard_pre_init_user();
}

void led_set_kb(uint8_t usb_led)
{
    if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
        // output high
        writePinHigh(C5);
    } else {
        // Hi-Z
        writePinLow(C5);
    }

    led_set_user(usb_led);
}

M keyboards/alps64/config.h => keyboards/alps64/config.h +2 -0
@@ 37,6 37,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.

#define DIODE_DIRECTION COL2ROW

#define LED_CAPS_LOCK_PIN C5

/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST


M keyboards/amjpad/amjpad.c => keyboards/amjpad/amjpad.c +0 -29
@@ 1,30 1,1 @@
#include "amjpad.h"
#include "led.h"

void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up
	matrix_init_user();
	led_init_ports();
};

void matrix_scan_kb(void) {
	// put your looping keyboard code here
	// runs every cycle (a lot)
	matrix_scan_user();
};

void led_init_ports(void) {
    // * Set our LED pins as output
    DDRD |= (1<<6);
}

void led_set_kb(uint8_t usb_led) {
    if (usb_led & (1<<USB_LED_NUM_LOCK)) {
        // Turn numlock on
        PORTD &= ~(1<<6);
    } else {
        // Turn numlock off
        PORTD |= (1<<6);
    }
}

M keyboards/amjpad/config.h => keyboards/amjpad/config.h +3 -0
@@ 54,6 54,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

#define LED_NUM_LOCK_PIN D6
#define LED_PIN_ON_STATE 0

/* Backlight configuration
 */
#define BACKLIGHT_LEVELS 4

M keyboards/exclusive/e6v2/le/config.h => keyboards/exclusive/e6v2/le/config.h +3 -0
@@ 37,6 37,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
#define UNUSED_PINS

#define LED_CAPS_LOCK_PIN B7
#define LED_PIN_ON_STATE 0

#define RGB_DI_PIN E6
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS

M keyboards/exclusive/e6v2/le/le.c => keyboards/exclusive/e6v2/le/le.c +0 -32
@@ 1,33 1,1 @@
#include "le.h"

void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up

	matrix_init_user();
}

void matrix_scan_kb(void) {
	// put your looping keyboard code here
	// runs every cycle (a lot)

	matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
	// put your per-action keyboard code here
	// runs for every action, just before processing by the firmware

	return process_record_user(keycode, record);
}

void led_set_user(uint8_t usb_led) {
	if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
		DDRB |= (1 << 7); 
		PORTB &= ~(1 << 7);
	} else {
		DDRB &= ~(1 << 7); 
		PORTB &= ~(1 << 7);
	}
}


M keyboards/exclusive/e7v1/config.h => keyboards/exclusive/e7v1/config.h +2 -0
@@ 22,6 22,8 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define LED_CAPS_LOCK_PIN F0

/* number of backlight levels */
#define BACKLIGHT_PIN B7
#ifdef BACKLIGHT_PIN

M keyboards/exclusive/e7v1/e7v1.c => keyboards/exclusive/e7v1/e7v1.c +0 -24
@@ 1,25 1,1 @@
#include "e7v1.h"

void matrix_init_kb(void) {
  setPinOutput(F0);
  matrix_init_user();
}

void matrix_scan_kb(void) {
  matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
  if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
    writePinHigh(F0);
  } else {
    writePinLow(F0);
  }

  led_set_user(usb_led);
}


M keyboards/fc980c/config.h => keyboards/fc980c/config.h +4 -1
@@ 49,7 49,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE  0
#define TAPPING_TERM      175

#define LED_NUM_LOCK_PIN B4
#define LED_CAPS_LOCK_PIN B5
#define LED_SCROLL_LOCK_PIN B6

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
// #define LOCKING_SUPPORT_ENABLE

M keyboards/fc980c/fc980c.c => keyboards/fc980c/fc980c.c +0 -37
@@ 22,46 22,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
#endif

void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up

#ifdef ACTUATION_DEPTH_ADJUSTMENT
    adjust_actuation_point(ACTUATION_DEPTH_ADJUSTMENT);
#endif

	matrix_init_user();
}

void matrix_scan_kb(void) {
	// put your looping keyboard code here
	// runs every cycle (a lot)

	matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
	// put your per-action keyboard code here
	// runs for every action, just before processing by the firmware

	return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
    if (usb_led & (1<<USB_LED_NUM_LOCK)) {
        PORTB |=  (1<<4);
    } else {
        PORTB &= ~(1<<4);
    }
    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
        PORTB |=  (1<<5);
    } else {
        PORTB &= ~(1<<5);
    }
    if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
        PORTB |=  (1<<6);
    } else {
        PORTB &= ~(1<<6);
    }

	led_set_user(usb_led);
}

M keyboards/foxlab/leaf60/hotswap/config.h => keyboards/foxlab/leaf60/hotswap/config.h +3 -0
@@ 48,6 48,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

#define LED_CAPS_LOCK_PIN E6
#define LED_PIN_ON_STATE 0

#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 4

M keyboards/foxlab/leaf60/hotswap/hotswap.c => keyboards/foxlab/leaf60/hotswap/hotswap.c +0 -43
@@ 14,46 14,3 @@
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "hotswap.h"

// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.

void matrix_init_kb(void) {
  // put your keyboard start-up code here
  // runs once when the firmware starts up
  setPinOutput(E6);
  matrix_init_user();
}
/*

void matrix_scan_kb(void) {
  // put your looping keyboard code here
  // runs every cycle (a lot)

  matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  // put your per-action keyboard code here
  // runs for every action, just before processing by the firmware

  return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
  // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

  led_set_user(usb_led);
}

*/

void led_set_kb(uint8_t usb_led) {
  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
    writePinLow(E6);
  } else {
    writePinHigh(E6);
  }
	led_set_user(usb_led);
}

M keyboards/foxlab/leaf60/universal/config.h => keyboards/foxlab/leaf60/universal/config.h +3 -0
@@ 48,6 48,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

#define LED_CAPS_LOCK_PIN E6
#define LED_PIN_ON_STATE 0

#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3

M keyboards/foxlab/leaf60/universal/universal.c => keyboards/foxlab/leaf60/universal/universal.c +0 -45
@@ 14,48 14,3 @@
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "universal.h"

// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.

void matrix_init_kb(void) {
  // put your keyboard start-up code here
  // runs once when the firmware starts up
  setPinOutput(E6);
  matrix_init_user();
}

/*

void matrix_scan_kb(void) {
  // put your looping keyboard code here
  // runs every cycle (a lot)

  matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  // put your per-action keyboard code here
  // runs for every action, just before processing by the firmware

  return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
  // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

  led_set_user(usb_led);
}

*/


void led_set_kb(uint8_t usb_led) {
  if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
    writePinLow(E6);
  } else {
    writePinHigh(E6);
  }
	led_set_user(usb_led);
}

M keyboards/hineybush/hineyg80/config.h => keyboards/hineybush/hineyg80/config.h +5 -0
@@ 22,6 22,11 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW


#define LED_NUM_LOCK_PIN C6
#define LED_CAPS_LOCK_PIN B6
#define LED_SCROLL_LOCK_PIN B5

/* number of backlight levels */

#ifdef BACKLIGHT_PIN

M keyboards/hineybush/hineyg80/hineyg80.c => keyboards/hineybush/hineyg80/hineyg80.c +0 -47
@@ 14,50 14,3 @@
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "hineyg80.h"

void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up

	matrix_init_user();
}

void matrix_scan_kb(void) {
	// put your looping keyboard code here
	// runs every cycle (a lot)

	matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
	// put your per-action keyboard code here
	// runs for every action, just before processing by the firmware

	return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
	// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
	if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
        // Turn numlock on
		writePinHigh(C6);
    } else {
        // Turn numlock off
	    writePinLow(C6);
    }
	if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
        // Turn capslock on
		writePinHigh(B6);
    } else {
        // Turn capslock off
		writePinLow(B6);
    }
	if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
        // Turn scrolllock on
	    writePinHigh(B5);
    } else {
        // Turn scrolllock off
		writePinLow(B5);
    }
	led_set_user(usb_led);
}

M keyboards/jc65/v32u4/config.h => keyboards/jc65/v32u4/config.h +3 -0
@@ 37,6 37,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4, F5 }
#define UNUSED_PINS

#define LED_CAPS_LOCK_PIN B2
#define LED_PIN_ON_STATE 0

#define RGB_DI_PIN E2
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS

M keyboards/jc65/v32u4/v32u4.c => keyboards/jc65/v32u4/v32u4.c +0 -35
@@ 1,36 1,1 @@
#include "v32u4.h"

void matrix_init_kb(void) {
	// put your keyboard start-up code here
	// runs once when the firmware starts up

	matrix_init_user();
}

void matrix_scan_kb(void) {
	// put your looping keyboard code here
	// runs every cycle (a lot)

	matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
	// put your per-action keyboard code here
	// runs for every action, just before processing by the firmware

	return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
	// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
    if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
        // output low
        DDRB |= (1<<2);
        PORTB &= ~(1<<2);
    } else {
        // Hi-Z
        DDRB &= ~(1<<2);
        PORTB &= ~(1<<2);
    }
	led_set_user(usb_led);
}

M keyboards/kmac/config.h => keyboards/kmac/config.h +4 -0
@@ 45,6 45,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
//#define DIODE_DIRECTION

#define LED_CAPS_LOCK_PIN B0
#define LED_SCROLL_LOCK_PIN E6
#define LED_PIN_ON_STATE 0

/* number of backlight levels */
//#define BACKLIGHT_LEVELS 3
// #define BACKLIGHT_PIN B7

M keyboards/kmac/kmac.c => keyboards/kmac/kmac.c +0 -53
@@ 15,62 15,9 @@
 */
#include "kmac.h"

#define CAPS_PIN B0
#define SCROLL_PIN E6
#define F_ROW_MASK 0b01
#define WASD_MASK 0b10

// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.

void matrix_init_kb(void) {
    // put your keyboard start-up code here
    // runs once when the firmware starts up
    setPinOutput(CAPS_PIN);
    setPinOutput(SCROLL_PIN);

    matrix_init_user();
}

/*

void matrix_scan_kb(void) {
  // put your looping keyboard code here
  // runs every cycle (a lot)

  matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  // put your per-action keyboard code here
  // runs for every action, just before processing by the firmware

  return process_record_user(keycode, record);
}

*/

/* LED pin configuration
 * Scroll Lock: Low PE6
 * Caps Lock: Low PB0
 */
void led_set_kb(uint8_t usb_led) {
    if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
        writePinLow(CAPS_PIN);
    } else {
        writePinHigh(CAPS_PIN);
    }

    if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
        writePinLow(SCROLL_PIN);
    } else {
        writePinHigh(SCROLL_PIN);
    }

    led_set_user(usb_led);
}

void backlight_init_ports(void) {
    setPinOutput(B1);
    setPinOutput(B2);

M keyboards/melody96/config.h => keyboards/melody96/config.h +5 -0
@@ 22,6 22,11 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL

#define LED_NUM_LOCK_PIN C6
#define LED_CAPS_LOCK_PIN C7
#define LED_SCROLL_LOCK_PIN B5
#define LED_PIN_ON_STATE 0

/* number of backlight levels */
#define BACKLIGHT_PIN B6
#ifdef BACKLIGHT_PIN

M keyboards/melody96/melody96.c => keyboards/melody96/melody96.c +0 -22
@@ 1,23 1,1 @@
#include "melody96.h"

void led_set_kb(uint8_t usb_led) {
	if (usb_led & (1 << USB_LED_NUM_LOCK)) {
		DDRC |= (1 << 6); PORTC &= ~(1 << 6);
	} else {
		DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
	}

	if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
		DDRC |= (1 << 7); PORTC &= ~(1 << 7);
	} else {
		DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
	}

	if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
		DDRB |= (1 << 5); PORTB &= ~(1 << 5);
	} else {
		DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
	}

    led_set_user(usb_led);
}

M keyboards/peiorisboards/ixora/config.h => keyboards/peiorisboards/ixora/config.h +4 -0
@@ 22,3 22,7 @@

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 0

#define LED_NUM_LOCK_PIN A9
#define LED_CAPS_LOCK_PIN A10
#define LED_SCROLL_LOCK_PIN A8

M keyboards/peiorisboards/ixora/ixora.c => keyboards/peiorisboards/ixora/ixora.c +0 -42
@@ 1,43 1,1 @@
#include "ixora.h"

void matrix_init_kb(void) {
    // put your keyboard start-up code here
    // runs once when the firmware starts up
    setPinOutput(A8);
    setPinOutput(A9);
    setPinOutput(A10);
    writePinLow(A8);
    writePinLow(A9);
    writePinLow(A10);

    matrix_init_user();
}

void matrix_scan_kb(void) {

    matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {

    return process_record_user(keycode, record);
}

void led_set_kb(uint8_t usb_led) {
    if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
        writePinHigh(A10);
    } else {
        writePinLow(A10);
    }
    if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
        writePinHigh(A9);
    } else {
        writePinLow(A9);
    }
    if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
        writePinHigh(A8);
    } else {
        writePinLow(A8);
    }
    led_set_user(usb_led);
}

M keyboards/redscarf_iiplus/verb/config.h => keyboards/redscarf_iiplus/verb/config.h +3 -4
@@ 49,10 49,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW

/*
 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
 */
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
#define LED_NUM_LOCK_PIN E6
#define LED_CAPS_LOCK_PIN C7
#define LED_PIN_ON_STATE 0

#define BACKLIGHT_PIN B7
//   #define BACKLIGHT_BREATHING

M keyboards/redscarf_iiplus/verb/verb.c => keyboards/redscarf_iiplus/verb/verb.c +0 -35
@@ 14,38 14,3 @@
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "verb.h"

// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.

void matrix_init_kb(void) {
    // put your keyboard start-up code here
    // runs once when the firmware starts up

    matrix_init_user();
    led_init_ports();
}

void led_init_ports(void) {
	setPinOutput(C7);
	setPinOutput(E6);
}

void led_set_kb(uint8_t usb_led) {
    // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

    if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
        writePinLow(C7);
    } else {
        writePinHigh(C7);
    }

    if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
        writePinLow(E6);
    } else {
        writePinHigh(E6);
    }

    led_set_user(usb_led);
}

M keyboards/sck/osa/config.h => keyboards/sck/osa/config.h +4 -0
@@ 91,6 91,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
/* define if matrix has ghost (lacks anti-ghosting diodes) */
//#define MATRIX_HAS_GHOST

#define LED_NUM_LOCK_PIN C7
#define LED_CAPS_LOCK_PIN C6
#define LED_SCROLL_LOCK_PIN B6

/* number of backlight levels */

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */

M keyboards/sck/osa/osa.c => keyboards/sck/osa/osa.c +0 -57
@@ 14,60 14,3 @@
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include "osa.h"


// Optional override functions below.
// You can leave any or all of these undefined.
// These are only required if you want to perform custom actions.

/*

void matrix_init_kb(void) {
  // put your keyboard start-up code here
  // runs once when the firmware starts up

  matrix_init_user();
}

void matrix_scan_kb(void) {
  // put your looping keyboard code here
  // runs every cycle (a lot)

  matrix_scan_user();
}

bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
  // put your per-action keyboard code here
  // runs for every action, just before processing by the firmware

  return process_record_user(keycode, record);
}
*/

void matrix_init_board(void){
    setPinOutput(C7);
    setPinOutput(C6);
    setPinOutput(B6);
}

void led_set_kb(uint8_t usb_led) {
  // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here

  if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
        writePinHigh(C7);
    } else {
        writePinLow(C7);
    }
    if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
        writePinHigh(C6);
    } else {
        writePinLow(C6);
    }
    if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
        writePinHigh(B6);
    } else {
        writePinLow(B6);
    }
  led_set_user(usb_led);
}