Skip to content

Commit

Permalink
[Ajazz AK33 Rev1] Clean up unused files and fix caps lock indicator LED
Browse files Browse the repository at this point in the history
  • Loading branch information
CalcProgrammer1 committed Apr 2, 2021
1 parent da492c8 commit 50d6927
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 653 deletions.
7 changes: 1 addition & 6 deletions keyboards/ajazz/ak33/rev1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,10 @@
#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11 }
#define MATRIX_ROW_PINS { D15, D14, D13, D12, D11, D10 }

#define LED_PIN_ON_STATE 0
//#define LED_NUM_LOCK_PIN D5
#define LED_CAPS_LOCK_PIN D6
//#define LED_SCROLL_LOCK_PIN D7

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5

/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
//#define LOCKING_RESYNC_ENABLE
//#define LOCKING_RESYNC_ENABLE
6 changes: 4 additions & 2 deletions keyboards/ajazz/ak33/rev1/config_led.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define LED_MATRIX_ROW_CHANNELS 3
#define LED_MATRIX_ROWS_HW (LED_MATRIX_ROWS * LED_MATRIX_ROW_CHANNELS)
#define LED_MATRIX_ROW_PINS { C0, C1, C3, C4, C14, C15, C5, C6, C7, C8, C9, C10, D0, D1, B6, B7, D2, D3 }
//#define LED_MATRIX_ROW_PINS { P2.0, P2.1, P2.3, P2.4, P2.14, P2.15, P2.5, P2.6, P2.7, P2.8, P2.9, P2.10, P3.0, P3.1, P1.6, P1.7, P3.2, P3.3 }

#define LED_MATRIX_COLS 17
#define LED_MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, A14, A15, B0, B1, B2, B3, B4, B10, B11 }

#define DRIVER_LED_TOTAL (6*17)
#define DRIVER_LED_TOTAL (6*17)

#define LED_CAPS_LOCK_PIN D6
#define LED_PIN_ON_STATE 0
13 changes: 1 addition & 12 deletions keyboards/ajazz/ak33/rev1/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
};

// Taken from 'g_led_config' in config_led.c
#define CAPS_LOCK_LED_ID 34

void rgb_matrix_indicators_user(void) {
if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) {
rgb_matrix_set_color(CAPS_LOCK_LED_ID, 0xFF, 0x00, 0x00);
} else {
rgb_matrix_set_color(CAPS_LOCK_LED_ID, 0x00, 0x00, 0x00);
}
}

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case BASE:
Expand All @@ -177,4 +166,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
}
return true;
}
}
6 changes: 5 additions & 1 deletion keyboards/ajazz/ak33/rev1/led_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ const rgb_matrix_driver_t rgb_matrix_driver = {
.flush = flush,
.set_color = set_color,
.set_color_all = set_color_all,
};
};

void led_set(uint8_t usb_led) {
writePin(LED_CAPS_LOCK_PIN, !IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
}
Loading

0 comments on commit 50d6927

Please sign in to comment.