Skip to content

Commit

Permalink
add doc for r65ble
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaxin96 committed May 23, 2021
1 parent 21d4461 commit 3ded209
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 15 deletions.
31 changes: 31 additions & 0 deletions keyboards/yandrstudio/r65ble/keymaps/test_uart/readme.md
Original file line number Diff line number Diff line change
@@ -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
```
5 changes: 4 additions & 1 deletion keyboards/yandrstudio/r65ble/keymaps/test_uart/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

16 changes: 2 additions & 14 deletions keyboards/yandrstudio/sb65p/rules.mk
Original file line number Diff line number Diff line change
@@ -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.
#
Expand All @@ -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

0 comments on commit 3ded209

Please sign in to comment.