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
67 changed files with 26 additions and 1211 deletions

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
*/