Get rid of USB_LED_KANA and USB_LED_COMPOSE (#21366)

This commit is contained in:
Ryan 2023-06-27 09:15:33 +10:00 committed by GitHub
parent fa4ea73bf6
commit 5542f5ede1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
67 changed files with 26 additions and 1211 deletions

View File

@ -71,42 +71,11 @@ layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _raise, _rgb, _adjust);
}
// scan matrix
void matrix_scan_user(void) {
}
// support for standard mod state keys (caps lock, scroll lock, etc.)
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

View File

@ -199,9 +199,6 @@ void music_scale_user(void)
#endif
void matrix_scan_user(void) {
}
//Tap Dance Definitions
tap_dance_action_t tap_dance_actions[] = {
//Tap once for Esc, twice for Caps Lock
@ -211,40 +208,3 @@ tap_dance_action_t tap_dance_actions[] = {
[TD_A_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_A, KC_TAB),
[TD_Q_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_Q, KC_ESC)
};
// don't know what this is doing...
/*
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
DDRD |= (1 << 5); PORTD &= ~(1 << 5);
} else {
DDRD &= ~(1 << 5); PORTD &= ~(1 << 5);
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 0); PORTB &= ~(1 << 0);
} else {
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}
*/

View File

@ -33,19 +33,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, KC_BSPC, KC_HOME, KC_PGDN, KC_END
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -43,15 +43,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -37,19 +37,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -46,23 +46,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void keyboard_post_init_user(void) {
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -19,15 +19,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "print.h"
#include "uart.h"
void led_set(uint8_t usb_led)
bool led_update_kb(led_t led_state)
{
uint8_t sun_led = 0;
if (usb_led & (1<<USB_LED_NUM_LOCK)) sun_led |= (1<<0);
if (usb_led & (1<<USB_LED_COMPOSE)) sun_led |= (1<<1);
if (usb_led & (1<<USB_LED_SCROLL_LOCK)) sun_led |= (1<<2);
if (usb_led & (1<<USB_LED_CAPS_LOCK)) sun_led |= (1<<3);
xprintf("LED: %02X\n", usb_led);
bool res = led_update_user(led_state);
if (res) {
uint8_t sun_led = 0;
if (led_state.num_lock) sun_led |= (1<<0);
if (led_state.compose) sun_led |= (1<<1);
if (led_state.scroll_lock) sun_led |= (1<<2);
if (led_state.caps_lock) sun_led |= (1<<3);
uart_write(0x0E);
uart_write(sun_led);
uart_write(0x0E);
uart_write(sun_led);
}
return res;
}

View File

@ -65,22 +65,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}
/*
* Keymap samples
*/

View File

@ -40,11 +40,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
// escape LED on layer 1
if (IS_LAYER_ON(1)) {
@ -53,7 +48,3 @@ void matrix_scan_user(void) {
writePinHigh(B0);
}
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -26,37 +26,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 2); PORTB &= ~(1 << 2);
} else {
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}
bool process_record_user(uint16_t keycode, keyrecord_t *record)

View File

@ -145,15 +145,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -236,10 +236,6 @@ void matrix_init_user(void) {
#endif
}
void matrix_scan_user(void) {
}
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _BL:
@ -263,7 +259,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
return state;
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -41,17 +41,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -62,19 +62,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______
)
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -25,19 +25,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_APP, KC_PDOT
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -552,7 +552,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -126,15 +126,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -219,10 +219,6 @@ void matrix_init_user(void) {
#endif
}
void matrix_scan_user(void) {
}
layer_state_t layer_state_set_user(layer_state_t state) {
switch (get_highest_layer(state)) {
case _BL:
@ -260,7 +256,3 @@ layer_state_t layer_state_set_user(layer_state_t state) {
}
return state;
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -146,15 +146,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -191,15 +191,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -35,48 +35,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG)
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

View File

@ -163,14 +163,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void eeconfig_init_user(void) {
set_unicode_input_mode(UNICODE_MODE_MACOS);
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -85,15 +85,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -35,19 +35,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END
)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
void led_set_user(uint8_t usb_led) {
}

View File

@ -56,48 +56,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
} else {
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
} else {
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
} else {
}
if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) {
} else {
}
if (IS_LED_ON(usb_led, USB_LED_KANA)) {
} else {
}
}

View File

@ -386,28 +386,4 @@ void led_set_user(uint8_t usb_led) {
bnumlock = false;
}
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
} else {
}
if (usb_led & (1 << USB_LED_COMPOSE)) {
} else {
}
if (usb_led & (1 << USB_LED_KANA)) {
} else {
}
}

View File

@ -112,22 +112,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
return true;
}
void led_set_user(uint8_t usb_led) {
}

Some files were not shown because too many files have changed in this diff Show More