Refactor to use led config - Part 2 (#10906)
* Refactor to use led config * Refactor to use led config * Refactor to use led config
This commit is contained in:
		
							parent
							
								
									3c156e130b
								
							
						
					
					
						commit
						adfd34c451
					
				
					 28 changed files with 59 additions and 600 deletions
				
			
		| 
						 | 
				
			
			@ -20,6 +20,9 @@
 | 
			
		|||
/* COL2ROW or ROW2COL */
 | 
			
		||||
#define DIODE_DIRECTION COL2ROW
 | 
			
		||||
 | 
			
		||||
#define LED_CAPS_LOCK_PIN B2
 | 
			
		||||
#define LED_PIN_ON_STATE 0
 | 
			
		||||
 | 
			
		||||
/* number of backlight levels */
 | 
			
		||||
#define BACKLIGHT_PIN B6
 | 
			
		||||
#ifdef BACKLIGHT_PIN
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,17 +1 @@
 | 
			
		|||
#include "rev1.h"
 | 
			
		||||
 | 
			
		||||
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(B2);
 | 
			
		||||
  } else {
 | 
			
		||||
    writePinHigh(B2);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  led_set_user(usb_led);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void matrix_init_kb(void) {
 | 
			
		||||
  setPinOutput(B2);
 | 
			
		||||
  matrix_init_user();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,17 +1 @@
 | 
			
		|||
#include "rev2.h"
 | 
			
		||||
 | 
			
		||||
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(B2);
 | 
			
		||||
  } else {
 | 
			
		||||
    writePinHigh(B2);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  led_set_user(usb_led);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void matrix_init_kb(void) {
 | 
			
		||||
  setPinOutput(B2);
 | 
			
		||||
  matrix_init_user();
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue