Browse Source

gh80_3000 - Enable indicator LED functionality (#23633)

Co-authored-by: chalex <alejandrelee+magbogbro@gmail.com>
dd_joystick
chalex 2 weeks ago
committed by GitHub
parent
commit
b4b222a6e3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
8 changed files with 12 additions and 164 deletions
  1. +0
    -7
      keyboards/gh80_3000/config.h
  2. +12
    -0
      keyboards/gh80_3000/keyboard.json
  3. +0
    -27
      keyboards/gh80_3000/keymaps/ansi_std/keymap.c
  4. +0
    -26
      keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c
  5. +0
    -26
      keyboards/gh80_3000/keymaps/default/keymap.c
  6. +0
    -26
      keyboards/gh80_3000/keymaps/iso_default/keymap.c
  7. +0
    -26
      keyboards/gh80_3000/keymaps/iso_std/keymap.c
  8. +0
    -26
      keyboards/gh80_3000/keymaps/iso_wkl/keymap.c

+ 0
- 7
keyboards/gh80_3000/config.h View File

@ -1,7 +0,0 @@
#pragma once
/* 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

+ 12
- 0
keyboards/gh80_3000/keyboard.json View File

@ -16,6 +16,18 @@
"mousekey": false,
"nkro": true
},
"qmk": {
"locking": {
"enabled": true,
"resync": true
}
},
"indicators": {
"num_lock": "B5",
"caps_lock": "B6",
"scroll_lock": "B7",
"on_state": 0
},
"matrix_pins": {
"cols": ["C7", "C6", "B4", "D7", "B3", "B2", "B0", "E6", "B1", "D1", "D6"],
"rows": ["F4", "F1", "F0", "F5", "F6", "F7", "D4", "D5", "D3", "D2", "D0"]


+ 0
- 27
keyboards/gh80_3000/keymaps/ansi_std/keymap.c View File

@ -11,30 +11,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
)
};
bool led_update_user(led_t led_state) {
if (led_state.num_lock) {
DDRB |= (1 << 5);
PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5);
PORTB &= ~(1 << 5);
}
if (led_state.caps_lock) {
DDRB |= (1 << 6);
PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6);
PORTB &= ~(1 << 6);
}
if (led_state.scroll_lock) {
DDRB |= (1 << 7);
PORTB &= ~(1 << 7);
} else {
DDRB &= ~(1 << 7);
PORTB &= ~(1 << 7);
}
return false;
}

+ 0
- 26
keyboards/gh80_3000/keymaps/ansi_wkl/keymap.c View File

@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
bool led_update_user(led_t led_state) {
if (led_state.num_lock) {
DDRB |= (1 << 5);
PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5);
PORTB &= ~(1 << 5);
}
if (led_state.caps_lock) {
DDRB |= (1 << 6);
PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6);
PORTB &= ~(1 << 6);
}
if (led_state.scroll_lock) {
DDRB |= (1 << 7);
PORTB &= ~(1 << 7);
} else {
DDRB &= ~(1 << 7);
PORTB &= ~(1 << 7);
}
return false;
}

+ 0
- 26
keyboards/gh80_3000/keymaps/default/keymap.c View File

@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
bool led_update_user(led_t led_state) {
if (led_state.num_lock) {
DDRB |= (1 << 5);
PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5);
PORTB &= ~(1 << 5);
}
if (led_state.caps_lock) {
DDRB |= (1 << 6);
PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6);
PORTB &= ~(1 << 6);
}
if (led_state.scroll_lock) {
DDRB |= (1 << 7);
PORTB &= ~(1 << 7);
} else {
DDRB &= ~(1 << 7);
PORTB &= ~(1 << 7);
}
return false;
}

+ 0
- 26
keyboards/gh80_3000/keymaps/iso_default/keymap.c View File

@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
bool led_update_user(led_t led_state) {
if (led_state.num_lock) {
DDRB |= (1 << 5);
PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5);
PORTB &= ~(1 << 5);
}
if (led_state.caps_lock) {
DDRB |= (1 << 6);
PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6);
PORTB &= ~(1 << 6);
}
if (led_state.scroll_lock) {
DDRB |= (1 << 7);
PORTB &= ~(1 << 7);
} else {
DDRB &= ~(1 << 7);
PORTB &= ~(1 << 7);
}
return false;
}

+ 0
- 26
keyboards/gh80_3000/keymaps/iso_std/keymap.c View File

@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
bool led_update_user(led_t led_state) {
if (led_state.num_lock) {
DDRB |= (1 << 5);
PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5);
PORTB &= ~(1 << 5);
}
if (led_state.caps_lock) {
DDRB |= (1 << 6);
PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6);
PORTB &= ~(1 << 6);
}
if (led_state.scroll_lock) {
DDRB |= (1 << 7);
PORTB &= ~(1 << 7);
} else {
DDRB &= ~(1 << 7);
PORTB &= ~(1 << 7);
}
return false;
}

+ 0
- 26
keyboards/gh80_3000/keymaps/iso_wkl/keymap.c View File

@ -12,29 +12,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
bool led_update_user(led_t led_state) {
if (led_state.num_lock) {
DDRB |= (1 << 5);
PORTB &= ~(1 << 5);
} else {
DDRB &= ~(1 << 5);
PORTB &= ~(1 << 5);
}
if (led_state.caps_lock) {
DDRB |= (1 << 6);
PORTB &= ~(1 << 6);
} else {
DDRB &= ~(1 << 6);
PORTB &= ~(1 << 6);
}
if (led_state.scroll_lock) {
DDRB |= (1 << 7);
PORTB &= ~(1 << 7);
} else {
DDRB &= ~(1 << 7);
PORTB &= ~(1 << 7);
}
return false;
}

Loading…
Cancel
Save