From 3ded20970fa310bdfc83a5eab3155a1c5907b455 Mon Sep 17 00:00:00 2001 From: jiaxin96 <572673807@qq.com> Date: Sun, 23 May 2021 11:48:31 +0800 Subject: [PATCH] add doc for r65ble --- .../r65ble/keymaps/test_uart/readme.md | 31 +++++++++++++++++++ .../r65ble/keymaps/test_uart/rules.mk | 5 ++- keyboards/yandrstudio/sb65p/rules.mk | 16 ++-------- 3 files changed, 37 insertions(+), 15 deletions(-) create mode 100644 keyboards/yandrstudio/r65ble/keymaps/test_uart/readme.md diff --git a/keyboards/yandrstudio/r65ble/keymaps/test_uart/readme.md b/keyboards/yandrstudio/r65ble/keymaps/test_uart/readme.md new file mode 100644 index 000000000000..7d74a6d09553 --- /dev/null +++ b/keyboards/yandrstudio/r65ble/keymaps/test_uart/readme.md @@ -0,0 +1,31 @@ +# BLE_UART SUPPORT FOR ARM + +## send source support + +## uart support +1. add biu_ble5 support in your $(keymap)/relus.mk +```shell +BIU_BLE5_ENABLE = yes +``` + +2. add uart.c to src (in file qmk_firmware/tmk_core/protocol/chibios.mk) +```shell +# into end of the chibios.mk +ifeq ($(strip $(BIU_BLE5_ENABLE)), yes) + SRC += uart.c + VPATH += $(DRIVER_PATH)/chibios + OPT_DEFS += -DBIU_BLE5_ENABLE +endif +``` +3. add uart support in the main function (in file qmk_firmware/tmk_core/protocol/chibios/main.c) +```c++ +// head of the main.c file +#ifdef BIU_BLE5_ENABLE + #include "uart.h" +#endif + +// behind host_set_driver(driver), around line 218 +#ifdef BIU_BLE5_ENABLE + uart_init(9600); +#endif +``` diff --git a/keyboards/yandrstudio/r65ble/keymaps/test_uart/rules.mk b/keyboards/yandrstudio/r65ble/keymaps/test_uart/rules.mk index 24985c78a369..e8f459441cc6 100644 --- a/keyboards/yandrstudio/r65ble/keymaps/test_uart/rules.mk +++ b/keyboards/yandrstudio/r65ble/keymaps/test_uart/rules.mk @@ -3,4 +3,7 @@ OPT_ENABLE = yes WPM_ENABLE = yes OLED_DRIVER_ENABLE = yes CONSOLE_ENABLE = no -QUANTUM_LIB_SRC += uart.c +# QUANTUM_LIB_SRC += uart.c + +BIU_BLE5_ENABLE = yes + diff --git a/keyboards/yandrstudio/sb65p/rules.mk b/keyboards/yandrstudio/sb65p/rules.mk index d5d01b8d99e6..2d3e51f1a2f9 100644 --- a/keyboards/yandrstudio/sb65p/rules.mk +++ b/keyboards/yandrstudio/sb65p/rules.mk @@ -1,20 +1,8 @@ -# # project specific files -SRC = matrix.c - - -USB = /dev/ttyACM0 - -OPT_DEFS += -DCHIMERA_ORTHO_PROMICRO -CHIMERA_ORTHO_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - - # MCU name MCU = atmega32u2 BOOTLOADER = caterina - # Build Options # comment out to disable the options. # @@ -30,10 +18,10 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality # MIDI_ENABLE = YES # MIDI controls -UNICODE_ENABLE = yes # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID VIA_ENABLE = yes LTO_ENABLE = yes +# # project specific file +SRC += matrix.c