diff options
author | Joel Challis <git@zvecr.com> | 2020-11-18 17:51:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 17:51:53 +0000 |
commit | f00402a2f3d551bcb1fb87245238e2b392192eb5 (patch) | |
tree | aad0bdc88a3fae31ac58cfdd62d99bac06dc67d0 /keyboards | |
parent | e1e13c53acb24c3617c3de88fa401acb3d628074 (diff) |
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
Diffstat (limited to 'keyboards')
30 files changed, 54 insertions, 546 deletions
diff --git a/keyboards/1upkeyboards/sweet16/v1/config.h b/keyboards/1upkeyboards/sweet16/v1/config.h index 5264ef698b..4020f4fdc0 100644 --- a/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/keyboards/1upkeyboards/sweet16/v1/config.h @@ -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 diff --git a/keyboards/1upkeyboards/sweet16/v1/v1.c b/keyboards/1upkeyboards/sweet16/v1/v1.c index 053620d333..0ff1041aac 100644 --- a/keyboards/1upkeyboards/sweet16/v1/v1.c +++ b/keyboards/1upkeyboards/sweet16/v1/v1.c @@ -1,21 +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 -} diff --git a/keyboards/alps64/alps64.c b/keyboards/alps64/alps64.c index 0e4ef07bc0..61270aaced 100644 --- a/keyboards/alps64/alps64.c +++ b/keyboards/alps64/alps64.c @@ -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); -} diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 25453e696f..15903818b9 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -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 diff --git a/keyboards/amjpad/amjpad.c b/keyboards/amjpad/amjpad.c index ac5991bd08..83cdedf688 100644 --- a/keyboards/amjpad/amjpad.c +++ b/keyboards/amjpad/amjpad.c @@ -1,30 +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); - } -} diff --git a/keyboards/amjpad/config.h b/keyboards/amjpad/config.h index bbb48624f8..dd579be5f2 100644 --- a/keyboards/amjpad/config.h +++ b/keyboards/amjpad/config.h @@ -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 diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 6477d5364a..71bd66b155 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -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 diff --git a/keyboards/exclusive/e6v2/le/le.c b/keyboards/exclusive/e6v2/le/le.c index f27bdc113b..dd973feec5 100644 --- a/keyboards/exclusive/e6v2/le/le.c +++ b/keyboards/exclusive/e6v2/le/le.c @@ -1,33 +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); - } -} - diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h index c8f1501250..11e47c3601 100644 --- a/keyboards/exclusive/e7v1/config.h +++ b/keyboards/exclusive/e7v1/config.h @@ -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 diff --git a/keyboards/exclusive/e7v1/e7v1.c b/keyboards/exclusive/e7v1/e7v1.c index 381585e6cf..880121f4f0 100644 --- a/keyboards/exclusive/e7v1/e7v1.c +++ b/keyboards/exclusive/e7v1/e7v1.c @@ -1,25 +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); -} - diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index f9d3e06d6e..7e79d8d1f8 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -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 diff --git a/keyboards/fc980c/fc980c.c b/keyboards/fc980c/fc980c.c index c09eacfa33..744a3614a5 100644 --- a/keyboards/fc980c/fc980c.c +++ b/keyboards/fc980c/fc980c.c @@ -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); -} diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h index 26b67586ef..0934c87bb7 100644 --- a/keyboards/foxlab/leaf60/hotswap/config.h +++ b/keyboards/foxlab/leaf60/hotswap/config.h @@ -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 diff --git a/keyboards/foxlab/leaf60/hotswap/hotswap.c b/keyboards/foxlab/leaf60/hotswap/hotswap.c index 20778d927d..e2de4a7e31 100644 --- a/keyboards/foxlab/leaf60/hotswap/hotswap.c +++ b/keyboards/foxlab/leaf60/hotswap/hotswap.c @@ -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); -} diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index 9f761f454d..f48bae497a 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -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 diff --git a/keyboards/foxlab/leaf60/universal/universal.c b/keyboards/foxlab/leaf60/universal/universal.c index 5fe663a1bf..197e411d70 100644 --- a/keyboards/foxlab/leaf60/universal/universal.c +++ b/keyboards/foxlab/leaf60/universal/universal.c @@ -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); -} diff --git a/keyboards/hineybush/hineyg80/config.h b/keyboards/hineybush/hineyg80/config.h index 4072def2fb..81bf622722 100644 --- a/keyboards/hineybush/hineyg80/config.h +++ b/keyboards/hineybush/hineyg80/config.h @@ -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 diff --git a/keyboards/hineybush/hineyg80/hineyg80.c b/keyboards/hineybush/hineyg80/hineyg80.c index 236c646be7..a56e46e9de 100644 --- a/keyboards/hineybush/hineyg80/hineyg80.c +++ b/keyboards/hineybush/hineyg80/hineyg80.c @@ -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); -} diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 8233dd1e8c..a00f64a1f5 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -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 diff --git a/keyboards/jc65/v32u4/v32u4.c b/keyboards/jc65/v32u4/v32u4.c index c69c5d5316..a6837268e1 100644 --- a/keyboards/jc65/v32u4/v32u4.c +++ b/keyboards/jc65/v32u4/v32u4.c @@ -1,36 +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); -} diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index b2c7f4d441..e924a4b141 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -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 diff --git a/keyboards/kmac/kmac.c b/keyboards/kmac/kmac.c index dcbbc2f179..78334cb754 100644 --- a/keyboards/kmac/kmac.c +++ b/keyboards/kmac/kmac.c @@ -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); diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h index 2533bfa353..038d974604 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h @@ -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 diff --git a/keyboards/melody96/melody96.c b/keyboards/melody96/melody96.c index 2fe274ee47..44e813586b 100644 --- a/keyboards/melody96/melody96.c +++ b/keyboards/melody96/melody96.c @@ -1,23 +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); -} diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/peiorisboards/ixora/config.h index 77ba89c292..4b52d18f3f 100644 --- a/keyboards/peiorisboards/ixora/config.h +++ b/keyboards/peiorisboards/ixora/config.h @@ -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 diff --git a/keyboards/peiorisboards/ixora/ixora.c b/keyboards/peiorisboards/ixora/ixora.c index 7996db629f..f2dcd864aa 100644 --- a/keyboards/peiorisboards/ixora/ixora.c +++ b/keyboards/peiorisboards/ixora/ixora.c @@ -1,43 +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); -} diff --git a/keyboards/redscarf_iiplus/verb/config.h b/keyboards/redscarf_iiplus/verb/config.h index 3fecdcac3b..d920596ec9 100755 --- a/keyboards/redscarf_iiplus/verb/config.h +++ b/keyboards/redscarf_iiplus/verb/config.h @@ -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 diff --git a/keyboards/redscarf_iiplus/verb/verb.c b/keyboards/redscarf_iiplus/verb/verb.c index 62ea1859d3..27a3d81533 100755 --- a/keyboards/redscarf_iiplus/verb/verb.c +++ b/keyboards/redscarf_iiplus/verb/verb.c @@ -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); -} diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h index 6710134400..9d041d0f0c 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/config.h @@ -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 */ diff --git a/keyboards/sck/osa/osa.c b/keyboards/sck/osa/osa.c index 138a28893b..7f144035e5 100644 --- a/keyboards/sck/osa/osa.c +++ b/keyboards/sck/osa/osa.c @@ -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 |