1
0
Fork 0
forked from forks/qmk_firmware

gh80_3000 - Enable indicator LED functionality (#23633)

Co-authored-by: chalex <alejandrelee+magbogbro@gmail.com>
This commit is contained in:
chalex 2024-04-29 21:36:10 -04:00 committed by GitHub
parent 78a76b6c1e
commit b4b222a6e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 12 additions and 164 deletions

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

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"]

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;
}

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;
}

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;
}

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;
}

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;
}

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;
}