M keyboards/ares/ares.c => keyboards/ares/ares.c +0 -16
@@ 16,19 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ares.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/ares/config.h => keyboards/ares/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 DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/bfake/bfake.c => keyboards/bfake/bfake.c +0 -16
@@ 16,19 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bfake.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/bfake/config.h => keyboards/bfake/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 DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/chili/chili.c => keyboards/chili/chili.c +0 -26
@@ 14,29 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "chili.h"
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- led_init_ports();
- matrix_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(B1);
- writePinHigh(B1);
- setPinOutput(B2);
- writePinHigh(B2);
- setPinOutput(B3);
- writePinHigh(B3);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- writePin(B1, !led_state.num_lock);
- writePin(B2, !led_state.caps_lock);
- writePin(B3, !led_state.scroll_lock);
- }
- return res;
-}
M keyboards/chili/config.h => keyboards/chili/config.h +5 -0
@@ 42,6 42,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN B1
+#define LED_CAPS_LOCK_PIN B2
+#define LED_SCROLL_LOCK_PIN B3
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
M keyboards/coarse/cordillera/config.h => keyboards/coarse/cordillera/config.h +4 -0
@@ 32,6 32,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { B15, B14, B13, B12, B11, B10, B2, B1, B8, B7, B6, B5, B4, B3, A15, A14 }
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN B0
+#define LED_CAPS_LOCK_PIN A1
+#define LED_SCROLL_LOCK_PIN A0
+
#define BACKLIGHT_PIN A8
#define BACKLIGHT_PWM_DRIVER PWMD1
#define BACKLIGHT_PWM_CHANNEL 1
M keyboards/coarse/cordillera/cordillera.c => keyboards/coarse/cordillera/cordillera.c +0 -20
@@ 16,23 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "cordillera.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(B0);
- setPinOutput(A1);
- setPinOutput(A0);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(B0, led_state.num_lock);
- writePin(A1, led_state.caps_lock);
- writePin(A0, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/crazy_keyboard_68/config.h => keyboards/crazy_keyboard_68/config.h +3 -0
@@ 52,6 52,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN B2
+#define LED_PIN_ON_STATE 0
+
//#define BACKLIGHT_PIN B7
//#define BACKLIGHT_LEVELS 3
//#define BACKLIGHT_BREATHING
M keyboards/crazy_keyboard_68/crazy_keyboard_68.c => keyboards/crazy_keyboard_68/crazy_keyboard_68.c +0 -19
@@ 15,22 15,3 @@
*/
#include "crazy_keyboard_68.h"
-
-void matrix_init_kb(void) {
- led_init_ports();
-
- matrix_init_user();
-}
-
-void led_init_ports(void) {
- // Caps lock pin
- setPinOutput(B0);
- writePinHigh(B0);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B0, !led_state.caps_lock);
- }
- return true;
-}
M keyboards/daisy/config.h => keyboards/daisy/config.h +3 -0
@@ 52,6 52,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN C6
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN D0
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 6
M keyboards/daisy/daisy.c => keyboards/daisy/daisy.c +0 -18
@@ 15,21 15,3 @@
*/
#include "daisy.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(C6);
- writePinHigh(C6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(C6, !led_state.caps_lock);
- }
-
- return true;
-}
M keyboards/do60/config.h => keyboards/do60/config.h +3 -0
@@ 45,6 45,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, F4, B4, D7, D6, B3, B0 }
#define UNUSED_PINS
+#define LED_CAPS_LOCK_PIN B2
+#define LED_PIN_ON_STATE 0
+
/* Backlight Setup */
#define BACKLIGHT_PIN B5
#define BACKLIGHT_LEVELS 6
M keyboards/do60/do60.c => keyboards/do60/do60.c +0 -17
@@ 2,26 2,9 @@
extern inline void setdefaultrgb(void);
-
void matrix_init_kb(void) {
// Keyboard start-up code goes here
// Runs once when the firmware starts up
matrix_init_user();
- led_init_ports();
setdefaultrgb();
};
-
-void led_init_ports(void) {
- // Set caps lock LED pin as output
- setPinOutput(B2);
- // Default to off
- writePinHigh(B2);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B2, !led_state.caps_lock);
- }
-
- return true;
-}
M keyboards/donutcables/budget96/budget96.c => keyboards/donutcables/budget96/budget96.c +0 -18
@@ 15,21 15,3 @@
*/
#include "budget96.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/donutcables/budget96/config.h => keyboards/donutcables/budget96/config.h +3 -0
@@ 37,6 37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/eve/meteor/config.h => keyboards/eve/meteor/config.h +2 -0
@@ 36,5 36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/eve/meteor/meteor.c => keyboards/eve/meteor/meteor.c +0 -16
@@ 15,19 15,3 @@
*/
#include "meteor.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/evyd13/eon75/config.h => keyboards/evyd13/eon75/config.h +5 -0
@@ 51,6 51,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B7
+#define LED_CAPS_LOCK_PIN D5
+#define LED_SCROLL_LOCK_PIN B0
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/evyd13/eon75/eon75.c => keyboards/evyd13/eon75/eon75.c +0 -29
@@ 14,32 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "eon75.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 led_init_ports(void) {
- // * Set our LED pins as output and high
- setPinOutput(D5);
- writePinHigh(D5);
-
- setPinOutput(B7);
- writePinHigh(B7);
-
- setPinOutput(B0);
- writePinHigh(B0);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D5, !led_state.caps_lock);
- writePin(B7, !led_state.num_lock);
- writePin(B0, !led_state.scroll_lock);
- }
-
- return true;
-}
M keyboards/evyd13/eon95/config.h => keyboards/evyd13/eon95/config.h +5 -0
@@ 51,6 51,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B7
+#define LED_CAPS_LOCK_PIN D5
+#define LED_SCROLL_LOCK_PIN B0
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/evyd13/eon95/eon95.c => keyboards/evyd13/eon95/eon95.c +0 -29
@@ 14,32 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "eon95.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 led_init_ports(void) {
- // * Set our LED pins as output and high
- setPinOutput(D5);
- writePinHigh(D5);
-
- setPinOutput(B7);
- writePinHigh(B7);
-
- setPinOutput(B0);
- writePinHigh(B0);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D5, !led_state.caps_lock);
- writePin(B7, !led_state.num_lock);
- writePin(B0, !led_state.scroll_lock);
- }
-
- return true;
-}
M keyboards/evyd13/gh80_1800/config.h => keyboards/evyd13/gh80_1800/config.h +5 -0
@@ 51,6 51,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN D6
+#define LED_CAPS_LOCK_PIN D7
+#define LED_SCROLL_LOCK_PIN D4
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/evyd13/gh80_1800/gh80_1800.c => keyboards/evyd13/gh80_1800/gh80_1800.c +0 -28
@@ 14,31 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "gh80_1800.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 led_init_ports(void) {
- setPinOutput(D6);
- setPinOutput(D7);
- setPinOutput(D4);
-
- writePinHigh(D6);
- writePinHigh(D7);
- writePinHigh(D4);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D6, !led_state.num_lock);
- writePin(D7, !led_state.caps_lock);
- writePin(D4, !led_state.scroll_lock);
- }
-
- return true;
-}
M keyboards/evyd13/minitomic/config.h => keyboards/evyd13/minitomic/config.h +3 -0
@@ 51,6 51,9 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN C7
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/evyd13/minitomic/minitomic.c => keyboards/evyd13/minitomic/minitomic.c +0 -34
@@ 14,37 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "minitomic.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 led pin as output, then high (off)
- writePinHigh(C7);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- // writePin sets the pin high for 1 and low for 0.
- // In this example the pins are inverted, setting
- // it low/0 turns it on, and high/1 turns the LED off.
- // This behavior depends on whether the LED is between the pin
- // and VCC or the pin and GND.
- writePin(C7, !led_state.caps_lock);
- }
- return res;
-}
-
M keyboards/evyd13/mx5160/config.h => keyboards/evyd13/mx5160/config.h +5 -0
@@ 55,6 55,11 @@
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B2
+#define LED_CAPS_LOCK_PIN B1
+#define LED_SCROLL_LOCK_PIN B3
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/evyd13/mx5160/mx5160.c => keyboards/evyd13/mx5160/mx5160.c +0 -42
@@ 14,45 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mx5160.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 led pin as output, then high (off)
-
- //Caps lock
- setPinOutput(B1);
- writePinHigh(B1);
-
- //Num lock
- setPinOutput(B2);
- writePinHigh(B2);
-
- //Scroll lock
- setPinOutput(B3);
- writePinHigh(B3);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- writePin(B2, !led_state.num_lock);
- writePin(B1, !led_state.caps_lock);
- writePin(B3, !led_state.scroll_lock);
- }
- return res;
-}
M keyboards/evyd13/nt660/config.h => keyboards/evyd13/nt660/config.h +2 -0
@@ 53,6 53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN D0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/evyd13/nt660/nt660.c => keyboards/evyd13/nt660/nt660.c +0 -16
@@ 14,19 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "nt660.h"
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(D0, !led_state.caps_lock);
- }
-
- return true;
-}
M keyboards/evyd13/quackfire/config.h => keyboards/evyd13/quackfire/config.h +4 -0
@@ 52,6 52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_CAPS_LOCK_PIN F7
+#define LED_SCROLL_LOCK_PIN F6
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 5
M keyboards/evyd13/quackfire/quackfire.c => keyboards/evyd13/quackfire/quackfire.c +0 -28
@@ 14,31 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quackfire.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(F6);
- setPinOutput(F7);
- writePinHigh(F6);
- writePinHigh(F7);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(F7, !led_state.caps_lock);
- writePin(F6, !led_state.scroll_lock);
- }
-
- return true;
-}
M keyboards/evyd13/wasdat/config.h => keyboards/evyd13/wasdat/config.h +5 -0
@@ 57,6 57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B2
+#define LED_CAPS_LOCK_PIN B0
+#define LED_SCROLL_LOCK_PIN B1
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/evyd13/wasdat/wasdat.c => keyboards/evyd13/wasdat/wasdat.c +0 -31
@@ 14,34 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wasdat.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(B0);
- writePinHigh(B0);
- setPinOutput(B1);
- writePinHigh(B1);
- setPinOutput(B2);
- writePinHigh(B2);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B0, !led_state.caps_lock);
- writePin(B1, !led_state.scroll_lock);
- writePin(B2, !led_state.num_lock);
- }
-
- return true;
-}
M keyboards/evyd13/wasdat_code/config.h => keyboards/evyd13/wasdat_code/config.h +5 -0
@@ 57,6 57,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN B3
+#define LED_CAPS_LOCK_PIN B1
+#define LED_SCROLL_LOCK_PIN B2
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B7
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5
M keyboards/evyd13/wasdat_code/wasdat_code.c => keyboards/evyd13/wasdat_code/wasdat_code.c +0 -31
@@ 14,34 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "wasdat_code.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(B1);
- setPinOutput(B2);
- setPinOutput(B3);
- writePinHigh(B1);
- writePinHigh(B2);
- writePinHigh(B3);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B1, !led_state.caps_lock);
- writePin(B2, !led_state.scroll_lock);
- writePin(B3, !led_state.num_lock);
- }
-
- return true;
-}
M keyboards/evyd13/wonderland/config.h => keyboards/evyd13/wonderland/config.h +5 -0
@@ 43,6 43,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN B1
+#define LED_CAPS_LOCK_PIN B2
+#define LED_SCROLL_LOCK_PIN B3
+#define LED_PIN_ON_STATE 0
+
/* Backlight configuration
*/
#define RGB_DI_PIN B7
M keyboards/evyd13/wonderland/wonderland.c => keyboards/evyd13/wonderland/wonderland.c +0 -33
@@ 1,34 1,1 @@
#include "wonderland.h"
-
-__attribute__ ((weak))
-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();
-};
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
- matrix_scan_user();
-};
-
-__attribute__ ((weak))
-void led_init_ports(void) {
- // * Set our LED pins as output
- setPinOutput(B1);
- setPinOutput(B2);
- setPinOutput(B3);
-}
-
-bool led_update_kb(led_t led_state) {
- bool runDefault = led_update_user(led_state);
- if (runDefault) {
- writePin(B1, !led_state.num_lock);
- writePin(B2, !led_state.caps_lock);
- writePin(B3, !led_state.scroll_lock);
- }
- return runDefault;
-}
M keyboards/exclusive/e65/config.h => keyboards/exclusive/e65/config.h +3 -0
@@ 39,6 39,9 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN B6
+#define LED_PIN_ON_STATE 0
+
/* number of backlight levels */
#define BACKLIGHT_PIN B7
#ifdef BACKLIGHT_PIN
M keyboards/exclusive/e65/e65.c => keyboards/exclusive/e65/e65.c +0 -21
@@ 15,24 15,3 @@
*/
#include "e65.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 led_init_ports(void) {
- setPinOutput(B6);
- writePinHigh(B6);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B6, !led_state.caps_lock);
- }
-
- return true;
-}
M keyboards/exclusive/e6v2/le_bmc/config.h => keyboards/exclusive/e6v2/le_bmc/config.h +2 -0
@@ 44,6 44,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/exclusive/e6v2/le_bmc/le_bmc.c => keyboards/exclusive/e6v2/le_bmc/le_bmc.c +0 -16
@@ 15,19 15,3 @@
*/
#include "le_bmc.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/exclusive/e6v2/oe_bmc/config.h => keyboards/exclusive/e6v2/oe_bmc/config.h +2 -0
@@ 44,6 44,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, C2, C3, C4, C5, D7 }
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c => keyboards/exclusive/e6v2/oe_bmc/oe_bmc.c +0 -16
@@ 15,19 15,3 @@
*/
#include "oe_bmc.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/exent/config.h => keyboards/exent/config.h +4 -0
@@ 38,6 38,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/exent/exent.c => keyboards/exent/exent.c +0 -20
@@ 15,23 15,3 @@
*/
#include "exent.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/facew/config.h => keyboards/facew/config.h +3 -0
@@ 37,6 37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/facew/facew.c => keyboards/facew/facew.c +0 -18
@@ 16,21 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "facew.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/foxlab/key65/hotswap/config.h => keyboards/foxlab/key65/hotswap/config.h +3 -0
@@ 45,6 45,9 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
+#define LED_SCROLL_LOCK_PIN E6
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5
M keyboards/foxlab/key65/hotswap/hotswap.c => keyboards/foxlab/key65/hotswap/hotswap.c +0 -17
@@ 15,20 15,3 @@
*/
#include "hotswap.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(E6);
- writePinHigh(E6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(E6, !led_state.caps_lock);
- }
- return true;
-}
M keyboards/foxlab/key65/universal/config.h => keyboards/foxlab/key65/universal/config.h +3 -0
@@ 45,6 45,9 @@
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
+#define LED_SCROLL_LOCK_PIN E6
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 5
M keyboards/foxlab/key65/universal/universal.c => keyboards/foxlab/key65/universal/universal.c +0 -17
@@ 15,20 15,3 @@
*/
#include "universal.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(E6);
- writePinHigh(E6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(E6, !led_state.caps_lock);
- }
- return true;
-}
M keyboards/freyr/config.h => keyboards/freyr/config.h +4 -0
@@ 47,6 47,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN B3
+#define LED_SCROLL_LOCK_PIN B7
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B6
#define BACKLIGHT_LEVELS 3
#define BACKLIGHT_BREATHING
M keyboards/freyr/freyr.c => keyboards/freyr/freyr.c +0 -19
@@ 15,22 15,3 @@
*/
#include "freyr.h"
-
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-}
-
-void led_init_ports(void) {
- setPinOutput(B3);
- setPinOutput(B7);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(B3, !led_state.caps_lock);
- writePin(B7, !led_state.scroll_lock);
- }
-
- return true;
-}
M keyboards/ft/mars80/config.h => keyboards/ft/mars80/config.h +3 -0
@@ 37,6 37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/ft/mars80/mars80.c => keyboards/ft/mars80/mars80.c +0 -18
@@ 15,21 15,3 @@
*/
#include "mars80.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/gray_studio/hb85/config.h => keyboards/gray_studio/hb85/config.h +4 -0
@@ 34,5 34,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLED_NUM 5
#define RGBLIGHT_ANIMATIONS
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/gray_studio/hb85/hb85.c => keyboards/gray_studio/hb85/hb85.c +0 -20
@@ 17,23 17,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "hb85.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/handwired/tritium_numpad/config.h => keyboards/handwired/tritium_numpad/config.h +3 -0
@@ 36,6 36,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { F4, F6, B1, B2 }
#define UNUSED_PINS
+#define LED_NUM_LOCK_PIN D5
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B6
/* COL2ROW or ROW2COL */
M keyboards/handwired/tritium_numpad/tritium_numpad.c => keyboards/handwired/tritium_numpad/tritium_numpad.c +0 -28
@@ 1,29 1,1 @@
#include "tritium_numpad.h"
-#include "led.h"
-
-void keyboard_pre_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- keyboard_pre_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
- // Numlock LED
- setPinOutput(D5);
-}
-
-void led_set_kb(uint8_t usb_led) {
- if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- writePinLow(D5);
- } else {
- writePinHigh(D5);
- }
-}
M keyboards/hid_liber/config.h => keyboards/hid_liber/config.h +4 -0
@@ 34,6 34,10 @@
// HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3.
//#define DIODE_DIRECTION
+#define LED_CAPS_LOCK_PIN B5
+#define LED_SCROLL_LOCK_PIN B6
+#define LED_PIN_ON_STATE 0
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/hid_liber/hid_liber.c => keyboards/hid_liber/hid_liber.c +0 -21
@@ 16,24 16,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "hid_liber.h"
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- led_init_ports();
- matrix_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(B5);
- setPinOutput(B6);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- writePin(B5, !led_state.caps_lock);
- writePin(B6, !led_state.scroll_lock);
- }
- return res;
-}
M keyboards/j80/config.h => keyboards/j80/config.h +4 -0
@@ 35,6 35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_LEVELS 3
#define BACKLIGHT_PIN D4
M keyboards/j80/j80.c => keyboards/j80/j80.c +0 -20
@@ 15,23 15,3 @@
*/
#include "j80.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/jc65/v32a/config.h => keyboards/jc65/v32a/config.h +2 -0
@@ 32,6 32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/jc65/v32a/v32a.c => keyboards/jc65/v32a/v32a.c +0 -16
@@ 16,19 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "v32a.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/kb_elmo/aek2_usb/aek2_usb.c => keyboards/kb_elmo/aek2_usb/aek2_usb.c +0 -20
@@ 15,23 15,3 @@
*/
#include "aek2_usb.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(B0);
- setPinOutput(B1);
- setPinOutput(B2);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(B0, led_state.scroll_lock);
- writePin(B1, led_state.caps_lock);
- writePin(B2, led_state.num_lock);
- }
- return true;
-}>
\ No newline at end of file
M keyboards/kb_elmo/aek2_usb/config.h => keyboards/kb_elmo/aek2_usb/config.h +4 -0
@@ 40,6 40,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN B2
+#define LED_CAPS_LOCK_PIN B1
+#define LED_SCROLL_LOCK_PIN B0
+
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
M keyboards/kbdfans/kbdpad/mk1/config.h => keyboards/kbdfans/kbdpad/mk1/config.h +2 -0
@@ 33,6 33,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_BREATHING
M keyboards/kbdfans/kbdpad/mk1/mk1.c => keyboards/kbdfans/kbdpad/mk1/mk1.c +0 -16
@@ 15,19 15,3 @@
*/
#include "mk1.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- }
- return true;
-}
M keyboards/kinesis/kint2pp/config.h => keyboards/kinesis/kint2pp/config.h +6 -1
@@ 25,7 25,12 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
-
+
+#define LED_NUM_LOCK_PIN C5
+#define LED_CAPS_LOCK_PIN C1
+#define LED_SCROLL_LOCK_PIN C4
+#define LED_COMPOSE_PIN C3
+#define LED_PIN_ON_STATE 0
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
M keyboards/kinesis/kint2pp/kint2pp.c => keyboards/kinesis/kint2pp/kint2pp.c +0 -25
@@ 1,26 1,1 @@
#include "kint2pp.h"
-
-void matrix_init_kb(void) {
- led_init_ports();
-
-
- matrix_init_user();
-}
-void led_init_ports() {
- // * Set our LED pins as output
- setPinOutput(C3); // Keypad LED
- setPinOutput(C4); // ScrLock LED
- setPinOutput(C5); // NumLock LED
- setPinOutput(C1); // CapsLock LED
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- writePin(C3, !led_state.compose);
- writePin(C4, !led_state.scroll_lock);
- writePin(C5, !led_state.num_lock);
- writePin(C1, !led_state.caps_lock);
- }
- return res;
-}
M keyboards/kinesis/nguyenvietyen/config.h => keyboards/kinesis/nguyenvietyen/config.h +6 -0
@@ 25,3 25,9 @@
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+
+#define LED_NUM_LOCK_PIN D4
+#define LED_CAPS_LOCK_PIN E6
+#define LED_SCROLL_LOCK_PIN C6
+#define LED_COMPOSE_PIN D7
+#define LED_PIN_ON_STATE 0
M keyboards/kinesis/nguyenvietyen/nguyenvietyen.c => keyboards/kinesis/nguyenvietyen/nguyenvietyen.c +0 -30
@@ 1,31 1,1 @@
#include "nguyenvietyen.h"
-
-void matrix_init_kb(void) {
- led_init_ports();
- matrix_init_user();
-}
-
-void led_init_ports() {
- // * Set our LED pins as output
- setPinOutput(D7); // Keypad LED
- setPinOutput(C6); // ScrLock LED
- setPinOutput(D4); // NumLock LED
- setPinOutput(E6); // CapsLock LED
-
- // turn all LEDs off by default
- writePinHigh(D7);
- writePinHigh(C6);
- writePinHigh(D4);
- writePinHigh(E6);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if (res) {
- writePin(D7, !led_state.compose);
- writePin(C6, !led_state.scroll_lock);
- writePin(D4, !led_state.num_lock);
- writePin(E6, !led_state.caps_lock);
- }
- return res;
-}
M keyboards/kira80/config.h => keyboards/kira80/config.h +3 -0
@@ 38,6 38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
M keyboards/kira80/kira80.c => keyboards/kira80/kira80.c +0 -18
@@ 15,21 15,3 @@
*/
#include "kira80.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}>
\ No newline at end of file
M keyboards/kona_classic/kona_classic.c => keyboards/kona_classic/kona_classic.c +0 -29
@@ 14,32 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "kona_classic.h"
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- led_init_ports();
- 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_init_ports(void) {
-// DDRB |= (1<<6) | (1<<7); // OUT
-}
-
-void led_set_kb(uint8_t usb_led) {
-// led_set_user(usb_led);
-}
M keyboards/mechlovin/adelais/adelais.c => keyboards/mechlovin/adelais/adelais.c +0 -27
@@ 15,30 15,3 @@
*/
#include "adelais.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 led_init_ports(void) {
- setPinOutput(B2);
- writePinLow(B2);
- setPinOutput(C15);
- writePinLow(C15);
- setPinOutput(B9);
- writePinLow(B9);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B2, led_state.caps_lock);
- writePin(B9, led_state.scroll_lock);
- writePin(C15, led_state.num_lock);
- }
-
- return true;
-}
M keyboards/mechlovin/adelais/config.h => keyboards/mechlovin/adelais/config.h +4 -0
@@ 30,3 30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
+
+#define LED_NUM_LOCK_PIN C15
+#define LED_CAPS_LOCK_PIN B2
+#define LED_SCROLL_LOCK_PIN B9
M keyboards/mechlovin/delphine/config.h => keyboards/mechlovin/delphine/config.h +3 -1
@@ 41,4 41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, D3 }
#define MATRIX_COL_PINS { F7, D7, D6, D2 }
-#define DIODE_DIRECTION COL2ROW>
\ No newline at end of file
+#define DIODE_DIRECTION COL2ROW
+
+#define LED_NUM_LOCK_PIN B5
M keyboards/mechlovin/delphine/delphine.c => keyboards/mechlovin/delphine/delphine.c +0 -18
@@ 15,21 15,3 @@
*/
#include "delphine.h"
-
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-}
-
-void led_init_ports(void) {
- setPinOutput(B5);
- writePinLow(B5);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B5, led_state.num_lock);
- }
-
- return true;
-}
M keyboards/mechlovin/hannah65/config.h => keyboards/mechlovin/hannah65/config.h +2 -0
@@ 41,6 41,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN B9
+
#define BACKLIGHT_PIN B8
#define BACKLIGHT_BREATHING
#define BACKLIGHT_PWM_DRIVER PWMD3
M keyboards/mechlovin/hannah65/hannah65.c => keyboards/mechlovin/hannah65/hannah65.c +0 -18
@@ 15,21 15,3 @@
*/
#include "hannah65.h"
-
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-}
-
-void led_init_ports(void) {
- setPinOutput(B9);
- writePinLow(B9);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B9, led_state.caps_lock);
- }
-
- return true;
-}
M keyboards/mechlovin/infinity87/config.h => keyboards/mechlovin/infinity87/config.h +2 -0
@@ 45,6 45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN A3
+#define LED_CAPS_LOCK_PIN A4
#define BACKLIGHT_PIN B0
#define BACKLIGHT_BREATHING
M keyboards/mechlovin/infinity87/infinity87.c => keyboards/mechlovin/infinity87/infinity87.c +0 -21
@@ 15,24 15,3 @@
*/
#include "infinity87.h"
-
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-}
-
-void led_init_ports(void) {
- setPinOutput(A3);
- writePinLow(A3);
- setPinOutput(A4);
- writePinLow(A4);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(A4, led_state.caps_lock);
- writePin(A3, led_state.num_lock);
- }
-
- return true;
-}
M keyboards/mechlovin/infinity88/config.h => keyboards/mechlovin/infinity88/config.h +2 -0
@@ 45,6 45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN A3
+#define LED_CAPS_LOCK_PIN A4
#define BACKLIGHT_PIN B0
#define BACKLIGHT_BREATHING
M keyboards/mechlovin/infinity88/infinity88.c => keyboards/mechlovin/infinity88/infinity88.c +0 -22
@@ 15,25 15,3 @@
*/
#include "infinity88.h"
-
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-}
-
-void led_init_ports(void) {
- setPinOutput(A3);
- writePinLow(A3);
- setPinOutput(A4);
- writePinLow(A4);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(A4, led_state.caps_lock);
- writePin(A3, led_state.num_lock);
- }
-
- return true;
-}
-
M keyboards/mechlovin/pisces/config.h => keyboards/mechlovin/pisces/config.h +2 -0
@@ 45,6 45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN B2
+
#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
M keyboards/mechlovin/pisces/pisces.c => keyboards/mechlovin/pisces/pisces.c +0 -25
@@ 15,28 15,3 @@
*/
#include "pisces.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(B2);
- writePinLow(B2);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B2, led_state.caps_lock);
- }
-
- return true;
-}
M keyboards/mehkee96/config.h => keyboards/mehkee96/config.h +4 -0
@@ 16,6 16,10 @@
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/mehkee96/mehkee96.c => keyboards/mehkee96/mehkee96.c +0 -18
@@ 16,21 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "mehkee96.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/nightly_boards/alter/rev1/config.h => keyboards/nightly_boards/alter/rev1/config.h +4 -0
@@ 44,6 44,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D7
+#define LED_CAPS_LOCK_PIN D6
+#define LED_SCROLL_LOCK_PIN B4
+
// #define BACKLIGHT_PIN F1
// #define BACKLIGHT_BREATHING
// #define BACKLIGHT_LEVELS 3
M keyboards/nightly_boards/alter/rev1/rev1.c => keyboards/nightly_boards/alter/rev1/rev1.c +0 -20
@@ 15,23 15,3 @@
*/
#include "rev1.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D7);
- setPinOutput(D6);
- setPinOutput(B4);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D7, led_state.num_lock);
- writePin(D6, led_state.caps_lock);
- writePin(B4, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/panc60/config.h => keyboards/panc60/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 DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/panc60/panc60.c => keyboards/panc60/panc60.c +0 -16
@@ 15,19 15,3 @@
*/
#include "panc60.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/pandora/config.h => keyboards/pandora/config.h +3 -0
@@ 47,6 47,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
+
/* Encoder Function */
#define ENCODERS_PAD_A { F6 }
#define ENCODERS_PAD_B { F5 }
M keyboards/pandora/pandora.c => keyboards/pandora/pandora.c +0 -18
@@ 15,21 15,3 @@
*/
#include "pandora.h"
-
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-};
-
-void led_init_ports(void) {
- setPinOutput(E6);
- writePinHigh(E6);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
- if(res) {
- writePin(E6, !led_state.caps_lock);
- }
- return res;
-}
M keyboards/pearl/config.h => keyboards/pearl/config.h +4 -0
@@ 25,6 25,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MANUFACTURER Pearl Boards
#define PRODUCT Pearl
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 12
M keyboards/pearl/pearl.c => keyboards/pearl/pearl.c +0 -20
@@ 16,23 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "pearl.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/percent/canoe/canoe.c => keyboards/percent/canoe/canoe.c +0 -16
@@ 16,19 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "canoe.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/percent/canoe/config.h => keyboards/percent/canoe/config.h +2 -0
@@ 38,6 38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/percent/skog/config.h => keyboards/percent/skog/config.h +3 -0
@@ 32,6 32,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2 }
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define RGBLED_NUM 2
#define RGBLIGHT_ANIMATIONS
M keyboards/percent/skog/skog.c => keyboards/percent/skog/skog.c +0 -18
@@ 18,21 18,3 @@ ps2avrGB support code by Kenneth A. (bminiex/.[ch])
*/
#include "skog.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/percent/skog_lite/config.h => keyboards/percent/skog_lite/config.h +3 -0
@@ 38,6 38,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/percent/skog_lite/skog_lite.c => keyboards/percent/skog_lite/skog_lite.c +0 -18
@@ 15,21 15,3 @@
*/
#include "skog_lite.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/phantom/config.h => keyboards/phantom/config.h +3 -0
@@ 47,6 47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION ROW2COL
+#define LED_CAPS_LOCK_PIN B6
+#define LED_SCROLL_LOCK_PIN B7
+
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_LEVELS 3
// #define BACKLIGHT_BREATHING
M keyboards/phantom/phantom.c => keyboards/phantom/phantom.c +0 -20
@@ 15,23 15,3 @@
*/
#include "phantom.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
-
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(B6);
- setPinOutput(B7);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(B6, led_state.caps_lock);
- writePin(B7, led_state.scroll_lock);
- }
-
- return true;
-}
M keyboards/rart/rartlice/config.h => keyboards/rart/rartlice/config.h +5 -0
@@ 43,6 43,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
+#define LED_NUM_LOCK_PIN A8
+#define LED_CAPS_LOCK_PIN B14
+#define LED_SCROLL_LOCK_PIN A9
+#define LED_PIN_ON_STATE 0
+
#define RGBLIGHT_ANIMATIONS
#define RGB_DI_PIN B15
#define RGBLED_NUM 11
M keyboards/rart/rartlice/rartlice.c => keyboards/rart/rartlice/rartlice.c +0 -20
@@ 14,23 14,3 @@
*/
#include "rartlice.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(A8);
- setPinOutput(B14);
- setPinOutput(A9);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(A8, !led_state.num_lock);
- writePin(B14, !led_state.caps_lock);
- writePin(A9, !led_state.scroll_lock);
- }
- return true;
-}
M keyboards/redscarf_iiplus/verd/config.h => keyboards/redscarf_iiplus/verd/config.h +4 -0
@@ 52,6 52,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define LED_NUM_LOCK_PIN E6
+#define LED_CAPS_LOCK_PIN C6
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
M keyboards/redscarf_iiplus/verd/verd.c => keyboards/redscarf_iiplus/verd/verd.c +0 -27
@@ 13,30 13,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "verd.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);
- writePinHigh(C7);
- setPinOutput(E6);
- writePinHigh(E6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(C7, !led_state.caps_lock);
- writePin(E6, !led_state.num_lock);
- }
- return true;
-}
M keyboards/reversestudio/decadepad/config.h => keyboards/reversestudio/decadepad/config.h +3 -0
@@ 42,6 42,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
+#define LED_NUM_LOCK_PIN D4
+#define LED_PIN_ON_STATE 0
+
/* number of backlight levels */
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
M keyboards/reversestudio/decadepad/decadepad.c => keyboards/reversestudio/decadepad/decadepad.c +0 -15
@@ 1,16 1,1 @@
#include "decadepad.h"
-void matrix_init_kb(void) {
- led_init_ports();
- matrix_init_user();
-};
-
-void led_init_ports(void) {
- setPinOutput(D4);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)){
- writePin(D4, !led_state.num_lock);
- }
- return true;
-}>
\ No newline at end of file
M keyboards/singa/config.h => keyboards/singa/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 DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/singa/singa.c => keyboards/singa/singa.c +0 -16
@@ 15,19 15,3 @@
*/
#include "singa.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/stella/config.h => keyboards/stella/config.h +4 -0
@@ 47,6 47,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN B3
+#define LED_SCROLL_LOCK_PIN B7
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN B6
#define BACKLIGHT_LEVELS 3
#define BACKLIGHT_BREATHING
M keyboards/stella/stella.c => keyboards/stella/stella.c +0 -19
@@ 15,22 15,3 @@
*/
#include "stella.h"
-
-void matrix_init_kb(void) {
- matrix_init_user();
- led_init_ports();
-};
-
-void led_init_ports(void) {
- setPinOutput(B3);
- setPinOutput(B7);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(B3, !led_state.caps_lock);
- writePin(B7, !led_state.scroll_lock);
- }
-
- return true;
-}
M keyboards/tgr/910/910.c => keyboards/tgr/910/910.c +0 -20
@@ 15,23 15,3 @@
*/
#include "910.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/tgr/910/config.h => keyboards/tgr/910/config.h +4 -0
@@ 38,6 38,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/tgr/910ce/910ce.c => keyboards/tgr/910ce/910ce.c +0 -16
@@ 15,19 15,3 @@
*/
#include "910ce.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}>
\ No newline at end of file
M keyboards/tgr/910ce/config.h => keyboards/tgr/910ce/config.h +2 -0
@@ 38,6 38,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
#define RGBLIGHT_ANIMATIONS
M keyboards/tgr/alice/alice.c => keyboards/tgr/alice/alice.c +0 -20
@@ 16,23 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "alice.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/tgr/alice/config.h => keyboards/tgr/alice/config.h +4 -0
@@ 31,6 31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/tgr/jane/config.h => keyboards/tgr/jane/config.h +3 -0
@@ 36,5 36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/tgr/jane/jane.c => keyboards/tgr/jane/jane.c +0 -18
@@ 15,21 15,3 @@
*/
#include "jane.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/tgr/tris/config.h => keyboards/tgr/tris/config.h +2 -0
@@ 34,6 34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_NUM_LOCK_PIN D0
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/tgr/tris/tris.c => keyboards/tgr/tris/tris.c +0 -16
@@ 15,19 15,3 @@
*/
#include "tris.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- }
- return true;
-}
M keyboards/unikorn/config.h => keyboards/unikorn/config.h +2 -0
@@ 36,6 36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
#define DEBOUNCE 5
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 3
M keyboards/unikorn/unikorn.c => keyboards/unikorn/unikorn.c +0 -16
@@ 15,19 15,3 @@
*/
#include "unikorn.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/vn66/config.h => keyboards/vn66/config.h +3 -0
@@ 47,6 47,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 B6
#define BACKLIGHT_LEVELS 4
#define BACKLIGHT_BREATHING
M keyboards/vn66/vn66.c => keyboards/vn66/vn66.c +0 -17
@@ 15,20 15,3 @@
*/
#include "vn66.h"
-
-void matrix_init_kb(void) {
- led_init_ports();
- matrix_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(E6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(E6, !led_state.caps_lock);
- }
-
- return true;
-}
M keyboards/winkeyless/bface/bface.c => keyboards/winkeyless/bface/bface.c +0 -20
@@ 15,23 15,3 @@
*/
#include "bface.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/winkeyless/bface/config.h => keyboards/winkeyless/bface/config.h +4 -0
@@ 35,6 35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define RGBLED_NUM 16
#define RGBLIGHT_ANIMATIONS
M keyboards/winkeyless/bmini/bmini.c => keyboards/winkeyless/bmini/bmini.c +0 -20
@@ 16,23 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bmini.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/winkeyless/bmini/config.h => keyboards/winkeyless/bmini/config.h +4 -0
@@ 34,6 34,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define RGBLIGHT_ANIMATIONS
#define BACKLIGHT_PIN D4
M keyboards/winkeyless/bminiex/bminiex.c => keyboards/winkeyless/bminiex/bminiex.c +0 -20
@@ 16,23 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bminiex.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
- setPinOutput(D6);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- writePin(D6, led_state.scroll_lock);
- }
- return true;
-}
M keyboards/winkeyless/bminiex/config.h => keyboards/winkeyless/bminiex/config.h +4 -0
@@ 34,6 34,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 }
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_SCROLL_LOCK_PIN D6
+
#define RGBLIGHT_ANIMATIONS
#define BACKLIGHT_PIN D4
M keyboards/xbows/knight/config.h => keyboards/xbows/knight/config.h +4 -0
@@ 20,6 20,10 @@
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
+#define LED_NUM_LOCK_PIN D1
+#define LED_CAPS_LOCK_PIN C7
+#define LED_PIN_ON_STATE 0
+
/* number of backlight levels */
// #define BACKLIGHT_LEVELS 3
#define BACKLIGHT_PIN B7
M keyboards/xbows/knight/knight.c => keyboards/xbows/knight/knight.c +0 -22
@@ 1,23 1,1 @@
#include "knight.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 led_init_ports(void) {
- setPinOutput(D1);
- writePinHigh(D1);
- setPinOutput(C7);
- writePinHigh(C7);
-}
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(C7, !led_state.caps_lock);
- writePin(D1, !led_state.num_lock);
- }
- return true;
-}
M keyboards/xd68/config.h => keyboards/xd68/config.h +3 -0
@@ 47,6 47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN B2
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN F5
#define BACKLIGHT_LEVELS 6
#define BACKLIGHT_BREATHING
M keyboards/xd68/xd68.c => keyboards/xd68/xd68.c +0 -21
@@ 1,22 1,1 @@
#include "xd68.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 led_init_ports(void) {
- // * Set our LED pins as output
- setPinOutput(B2);
- writePinHigh(B2);
-}
-
-bool led_update_kb(led_t led_state) {
- if(led_update_user(led_state)) {
- writePin(B2, !led_state.caps_lock);
- }
- return true;
-}
-
M keyboards/xd87/config.h => keyboards/xd87/config.h +3 -0
@@ 49,6 49,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN E2
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN D0
// #define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
M keyboards/xd87/xd87.c => keyboards/xd87/xd87.c +0 -35
@@ 14,38 14,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "xd87.h"
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
- led_init_ports();
- 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);
-}
-
-bool led_update_kb(led_t led_state) {
- bool res = led_update_user(led_state);
-
- if (res) {
- writePin(E2, !led_state.caps_lock);
- }
-
- return res;
-}
-
-void led_init_ports(void) {
- setPinOutput(E2);
-}
M keyboards/ymd75/config.h => keyboards/ymd75/config.h +2 -0
@@ 29,6 29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 12
+#define LED_CAPS_LOCK_PIN D1
+
#define RGB_DI_PIN E2
#define RGBLED_NUM 16
#define RGBLIGHT_ANIMATIONS
M keyboards/ymd75/rev1/rev1.c => keyboards/ymd75/rev1/rev1.c +0 -16
@@ 16,19 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ymd75.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/ymd75/rev2/rev2.c => keyboards/ymd75/rev2/rev2.c +0 -16
@@ 16,19 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ymd75.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/ymd75/rev3/rev3.c => keyboards/ymd75/rev3/rev3.c +0 -14
@@ 16,17 16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ymd75.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) { setPinOutput(D1); }
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/ymd96/config.h => keyboards/ymd96/config.h +4 -0
@@ 35,6 35,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+#define LED_CAPS_LOCK_PIN D1
+#define LED_PIN_ON_STATE 0
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 12
#define BACKLIGHT_BREATHING
M keyboards/ymd96/ymd96.c => keyboards/ymd96/ymd96.c +0 -18
@@ 17,21 17,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ymd96.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/ymdk/bface/bface.c => keyboards/ymdk/bface/bface.c +0 -16
@@ 15,19 15,3 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D1);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D1, led_state.caps_lock);
- }
- return true;
-}
M keyboards/ymdk/bface/config.h => keyboards/ymdk/bface/config.h +2 -0
@@ 34,6 34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DIODE_DIRECTION COL2ROW
+#define LED_CAPS_LOCK_PIN D1
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 6
M keyboards/ymdk_np21/config.h => keyboards/ymdk_np21/config.h +2 -0
@@ 46,6 46,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
+#define LED_NUM_LOCK_PIN D0
+
#define BACKLIGHT_PIN D4
#define BACKLIGHT_LEVELS 12
#define BACKLIGHT_BREATHING
M keyboards/ymdk_np21/ymdk_np21.c => keyboards/ymdk_np21/ymdk_np21.c +0 -16
@@ 17,19 17,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ymdk_np21.h"
-
-void keyboard_pre_init_kb(void) {
- led_init_ports();
- keyboard_pre_init_user();
-}
-
-void led_init_ports(void) {
- setPinOutput(D0);
-}
-
-bool led_update_kb(led_t led_state) {
- if (led_update_user(led_state)) {
- writePin(D0, led_state.num_lock);
- }
- return true;
-}