From a6acc24edf09b2e1b74741e51e2a10d92001b0e5 Mon Sep 17 00:00:00 2001
From: jotix <47826561+jotix@users.noreply.github.com>
Date: Sun, 12 Apr 2020 14:25:09 -0300
Subject: [PATCH] [Keyboard] jotpad16 status leds (#8643)

* jotpad16 status leds

* jotpad16

* readme.md
---
 keyboards/handwired/jotpad16/config.h   |  9 +++++----
 keyboards/handwired/jotpad16/jotpad16.c |  7 +++++++
 keyboards/handwired/jotpad16/readme.md  | 24 +++++++++++++-----------
 keyboards/handwired/jotpad16/rules.mk   |  2 +-
 4 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/keyboards/handwired/jotpad16/config.h b/keyboards/handwired/jotpad16/config.h
index 075f9649c77c..dc6bb7959391 100644
--- a/keyboards/handwired/jotpad16/config.h
+++ b/keyboards/handwired/jotpad16/config.h
@@ -16,13 +16,14 @@
 
 /* pro_micro pin-out */
 #define MATRIX_ROW_PINS { B6, B2, D2, D3 }
-#define MATRIX_COL_PINS { B5, B4, B3, B1 }
+#define MATRIX_COL_PINS { E6, D7, B3, B1 }
 #define UNUSED_PINS
 
 /* leds */
-#define QMK_LED E6
-#define BACKLIGHT_LEVELS 3
-#define BACKLIGHT_PIN D7
+#define JOTPAD16_LEDS
+#define JOTPAD16_LED1 B5
+#define JOTPAD16_LED2 B4
+#define QMK_LED B5
 
 /* COL2ROW or ROW2COL */
 #define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/handwired/jotpad16/jotpad16.c b/keyboards/handwired/jotpad16/jotpad16.c
index 512234b91772..2f112a6101d9 100644
--- a/keyboards/handwired/jotpad16/jotpad16.c
+++ b/keyboards/handwired/jotpad16/jotpad16.c
@@ -4,3 +4,10 @@ void matrix_init_kb(void) {
 
 	matrix_init_user();
 }
+
+void keyboard_pre_init_kb() {
+    setPinOutput(JOTPAD16_LED1);
+    setPinOutput(JOTPAD16_LED2);
+    
+    keyboard_pre_init_user();
+}
diff --git a/keyboards/handwired/jotpad16/readme.md b/keyboards/handwired/jotpad16/readme.md
index 3d971a51548c..c8773cf18330 100644
--- a/keyboards/handwired/jotpad16/readme.md
+++ b/keyboards/handwired/jotpad16/readme.md
@@ -1,7 +1,5 @@
 # JotPad16
 
-![JotPad16](https://i.imgur.com/RwmqWuS.jpg)
-
 A ortholinear keypad (4x4) made by jotix.
 
 Keyboard Maintainer: [jotix](https://github.com/jotix)  
@@ -16,13 +14,13 @@ Hardware Supported: Arduino Pro Micro
 
 | columns     | 0  | 1  | 2  | 3  |
 |-------------|----|----|----|----| 
-| arduino pin | 9  | 8  | 14 | 15 |
-| qmk pin     | B5 | B4 | B3 | C3 |
+| arduino pin | 7  | 6  | 14 | 15 |
+| qmk pin     | E6 | D7 | B3 | C3 |
 
-|             | QMK led   | Backlight |
-|-------------|-----------|-----------|
-| Arduino pin | 7         | 6         |
-| qmk pin     | E6        | D7        |
+|             | LED1 | LED2 |
+|-------------|------|------|
+| Arduino pin | 9    | 8    |
+| QMK pin     | B5   | B4   |
 
 ### Compiling the Firmware
 
@@ -32,8 +30,12 @@ Make example for this keyboard (after setting up your build environment):
 
 ### The Default Keymap
 
-![Default Keymap](https://i.imgur.com/VJZcFRN.jpg)
+| 7 | 8 | 9 | - |
+|---|---|---|---|
+| 4 | 5 | 6 | + |
+|---|---|---|---|
+| 1 | 2 | 3 |ent|
+|---|---|---|---|
+| 0 | . | / | * |
 
 See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
-
-
diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk
index 0c9370f1c1d3..79c32c5c3527 100644
--- a/keyboards/handwired/jotpad16/rules.mk
+++ b/keyboards/handwired/jotpad16/rules.mk
@@ -22,7 +22,7 @@ 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
+BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
 MIDI_ENABLE = no            # MIDI controls
 AUDIO_ENABLE = no           # Audio output on port C6
 UNICODE_ENABLE = no         # Unicode