]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Keymap] add 2 custom leds to handwired/jotanck (#6042)
authorjotix <47826561+jotix@users.noreply.github.com>
Sat, 1 Jun 2019 20:26:46 +0000 (17:26 -0300)
committerDrashna Jaelre <drashna@live.com>
Sat, 1 Jun 2019 20:26:46 +0000 (13:26 -0700)
* add JOTANCK_LED1&2

* set BACKLIGHT_ENABLE = no

* add 2 custom leds

* swap custom led pins 1&2

* readme update

* update default keymap

keyboards/handwired/jotanck/config.h
keyboards/handwired/jotanck/jotanck.c
keyboards/handwired/jotanck/keymaps/default/keymap.c
keyboards/handwired/jotanck/readme.md
keyboards/handwired/jotanck/rules.mk

index 38b77586ecd4948e70bb754eab27a894438c8fb0..cbbd6ea96e457f144276e2c88218d6aaa71631ab 100644 (file)
 #define UNUSED_PINS
 
 /* leds */
-#define QMK_LED B4
-#define BACKLIGHT_LEVELS 3
-#define BACKLIGHT_PIN B5
-#define BACKLIGHT_BREATHING
-#define BREATHING_PERIOD 5
+#define JOTANCK_LEDS
+#define JOTANCK_LED1 B5
+#define JOTANCK_LED2 B4
 
 /* COL2ROW or ROW2COL */
 #define DIODE_DIRECTION COL2ROW
index 7744570b23a43d92316b58a3c831e8cf5a2034f3..812781c3b71dc9df6875870fcbfa7eca00a0371e 100644 (file)
@@ -1,6 +1,10 @@
 #include "jotanck.h"
 
 void matrix_init_kb(void) {
+  matrix_init_user();
+}
 
-       matrix_init_user();
+void keyboard_pre_init_user() {
+  setPinOutput(JOTANCK_LED1);
+  setPinOutput(JOTANCK_LED2);
 }
index 2e9f4a39f2a4c0f1dcc625ed7a6427a766c3f9bb..3eb01a658154a10e3e1e5629944aa60400a5121a 100644 (file)
@@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 [_ADJUST] = LAYOUT_ortho_4x12 (
     _______, RESET,   _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______,
     _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
-    _______, _______, _______, _______, _______, BL_STEP, BL_BRTG, _______, _______, _______, _______, _______,
+    _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
     _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
 ),    
 };
index 28bbab86bdfd24b160f954f1b5d7dda2d1529eab..4cf211adc348811c2d1e215a35f985ae2d6a2f98 100644 (file)
@@ -20,10 +20,10 @@ Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA-
 | Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2  | 3  | 4  | 5  |
 | QMK pin     | F4 | F5 | F6 | F7 | B1 | B3 | D3  | D2  | D1 | D0 | D4 | C6 |
 
-|             | QMK led   | Backlight |
-|-------------|-----------|-----------|
-| Arduino pin | 8         | 9         |
-| QMK pin     | B4        | B5        |
+|             | LED1 | LED2 |
+|-------------|------|------|
+| Arduino pin | 8    | 9    |
+| QMK pin     | B5   | B4   |
 
 ### Compiling the Firmware
 
index 6b39b7cc1abe1ce1a261c268f03807d09a530f71..fa2881413340cfcf453e3a38787e44b165799555 100644 (file)
@@ -50,10 +50,10 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
 BOOTMAGIC_ENABLE = no       # Virtual DIP switch configuration(+1000)
 MOUSEKEY_ENABLE = yes       # Mouse keys(+4700)
 EXTRAKEY_ENABLE = yes       # Audio control and System control(+450)
-CONSOLE_ENABLE = yes         # Console for debug(+400)
-COMMAND_ENABLE = no        # Commands for debug and configuration
-NKRO_ENABLE = yes            # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-BACKLIGHT_ENABLE = yes      # Enable keyboard backlight functionality
+CONSOLE_ENABLE = yes        # Console for debug(+400)
+COMMAND_ENABLE = no         # Commands for debug and configuration
+NKRO_ENABLE = yes           # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
 MIDI_ENABLE = no            # MIDI controls
 AUDIO_ENABLE = no           # Audio output on port C6
 UNICODE_ENABLE = no         # Unicode