diff --git a/keyboards/yandrstudio/whiteMouse28T/config.h b/keyboards/yandrstudio/whiteMouse28T/config.h index 65f322d4cce9..014c5cf16f86 100644 --- a/keyboards/yandrstudio/whiteMouse28T/config.h +++ b/keyboards/yandrstudio/whiteMouse28T/config.h @@ -46,7 +46,7 @@ //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +#define DEBOUNCE 3 diff --git a/keyboards/yandrstudio/whiteMouse28T/f401/config.h b/keyboards/yandrstudio/whiteMouse28T/f401/config.h index d4a4a9d63228..b78ef8400074 100644 --- a/keyboards/yandrstudio/whiteMouse28T/f401/config.h +++ b/keyboards/yandrstudio/whiteMouse28T/f401/config.h @@ -84,13 +84,13 @@ #endif -#define SERIAL_DRIVER SD1 -#define SD1_TX_PIN A9 -#define SD1_TX_PAL_MODE 7 -#define SD1_RX_PIN A10 -#define SD1_RX_PAL_MODE 7 +// #define SERIAL_DRIVER SD1 +// #define SD1_TX_PIN A9 +// #define SD1_TX_PAL_MODE 7 +// #define SD1_RX_PIN A10 +// #define SD1_RX_PAL_MODE 7 -#define ADC_RESOLUTION ADC_CFGR1_RES_12BIT +// #define ADC_RESOLUTION ADC_CFGR1_RES_12BIT diff --git a/keyboards/yandrstudio/whiteMouse28T/f401/halconf.h b/keyboards/yandrstudio/whiteMouse28T/f401/halconf.h index 1887845f4a8f..cbf35f4b87f9 100644 --- a/keyboards/yandrstudio/whiteMouse28T/f401/halconf.h +++ b/keyboards/yandrstudio/whiteMouse28T/f401/halconf.h @@ -27,8 +27,8 @@ #undef HAL_USE_SPI #define HAL_USE_SPI FALSE -#undef HAL_USE_ADC -#define HAL_USE_ADC TRUE +// #undef HAL_USE_ADC +// #define HAL_USE_ADC TRUE #undef SERIAL_USB_BUFFERS_SIZE diff --git a/keyboards/yandrstudio/whiteMouse28T/f401/mcuconf.h b/keyboards/yandrstudio/whiteMouse28T/f401/mcuconf.h index a12c489dd75c..b4994a11ce04 100644 --- a/keyboards/yandrstudio/whiteMouse28T/f401/mcuconf.h +++ b/keyboards/yandrstudio/whiteMouse28T/f401/mcuconf.h @@ -28,8 +28,8 @@ #define STM32_SERIAL_USE_USART1 TRUE -#undef STM32_ADC_USE_ADC1 -#define STM32_ADC_USE_ADC1 TRUE +// #undef STM32_ADC_USE_ADC1 +// #define STM32_ADC_USE_ADC1 TRUE #undef STM32_NO_INIT #undef STM32_HSI_ENABLED diff --git a/keyboards/yandrstudio/whiteMouse28T/f401/rules.mk b/keyboards/yandrstudio/whiteMouse28T/f401/rules.mk index fa028e805a42..f53c722fc8c7 100644 --- a/keyboards/yandrstudio/whiteMouse28T/f401/rules.mk +++ b/keyboards/yandrstudio/whiteMouse28T/f401/rules.mk @@ -23,5 +23,3 @@ SRC += eep/eeprom_stm32.c SRC += eep/flash_stm32.c OPT_DEFS += -DEEPROM_EMU_STM32F401xC COMMON_VPATH += keyboards/yandrstudio/whiteMouse28T/f401/eep - -SRC += analog.c diff --git a/keyboards/yandrstudio/whiteMouse28T/keymaps/uartAdc/rules.mk b/keyboards/yandrstudio/whiteMouse28T/keymaps/uartAdc/rules.mk index 94cba27f75f6..ee039e1d0800 100644 --- a/keyboards/yandrstudio/whiteMouse28T/keymaps/uartAdc/rules.mk +++ b/keyboards/yandrstudio/whiteMouse28T/keymaps/uartAdc/rules.mk @@ -1,3 +1,5 @@ VIA_ENABLE = yes +SRC += analog.c + QUANTUM_LIB_SRC += uart.c diff --git a/keyboards/yandrstudio/whiteMouse28T/keymaps/usbState/keymap.c b/keyboards/yandrstudio/whiteMouse28T/keymaps/usbState/keymap.c new file mode 100644 index 000000000000..84e6721bf2f4 --- /dev/null +++ b/keyboards/yandrstudio/whiteMouse28T/keymaps/usbState/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2021 JasonRen(biu) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, + RGB_TOG, KC_Z, KC_X, KC_C, KC_V, MO(1), KC_RSFT), + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE,KC_TRNS, KC_TRNS, KC_TRNS) +}; + + +void keyboard_post_init_user(void) { +// eeconfig_init(); + uart_init(115200); + debug_enable=true; +// debug_matrix=true; + debug_keyboard=true; +// //debug_mouse=true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + uart_putchar(0xff); + uart_putchar(keycode >> 8); + uart_putchar(keycode & 0xff); + uart_putchar(0xfe); + uprintf("KL: kc: 0x%04X, col: %u, row: %u, pressed: %b, time: %u, interrupt: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); + } + return true; + // switch (keycode) { + // case KC_N: + // if (record->event.pressed) { + // uart_putchar('#'); + // } else { + // // Do something else when release + // } + // return false; // Skip all further processing of this key + // default: + // return true; // Process all other keycodes normally + // } +} diff --git a/keyboards/yandrstudio/whiteMouse28T/keymaps/usbState/rules.mk b/keyboards/yandrstudio/whiteMouse28T/keymaps/usbState/rules.mk new file mode 100644 index 000000000000..94cba27f75f6 --- /dev/null +++ b/keyboards/yandrstudio/whiteMouse28T/keymaps/usbState/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes + +QUANTUM_LIB_SRC += uart.c