mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
parent
b8d36d6558
commit
fe8ec664fa
4 changed files with 46 additions and 12 deletions
2
.github/workflows/docker-image.yml
vendored
2
.github/workflows/docker-image.yml
vendored
|
@ -25,7 +25,7 @@ jobs: #定义工作流程
|
||||||
run: git config --global --add safe.directory /__w/uv-k5-firmware-chinese/uv-k5-firmware-chinese
|
run: git config --global --add safe.directory /__w/uv-k5-firmware-chinese/uv-k5-firmware-chinese
|
||||||
|
|
||||||
- name: Make #执行 make 命令
|
- name: Make #执行 make 命令
|
||||||
run: make both #编译项目
|
run: make bothandlayoutkeyupdown #编译项目
|
||||||
|
|
||||||
- name: size #计算 firmware 大小
|
- name: size #计算 firmware 大小
|
||||||
run: arm-none-eabi-size firmware #使用 arm-none-eabi-size 命令计算固件大小
|
run: arm-none-eabi-size firmware #使用 arm-none-eabi-size 命令计算固件大小
|
||||||
|
|
22
Makefile
22
Makefile
|
@ -56,6 +56,8 @@ ENABLE_CUSTOM_SIDEFUNCTIONS ?= 1
|
||||||
ENABLE_SIDEFUNCTIONS_SEND ?= 1
|
ENABLE_SIDEFUNCTIONS_SEND ?= 1
|
||||||
ENABLE_BLOCK ?= 0
|
ENABLE_BLOCK ?= 0
|
||||||
|
|
||||||
|
ENABLE_LAYOUT_KEY_UP_DOWN ?= 0
|
||||||
|
|
||||||
# ---- DEBUGGING ----
|
# ---- DEBUGGING ----
|
||||||
ENABLE_AM_FIX_SHOW_DATA ?= 0
|
ENABLE_AM_FIX_SHOW_DATA ?= 0
|
||||||
ENABLE_AGC_SHOW_DATA ?= 0
|
ENABLE_AGC_SHOW_DATA ?= 0
|
||||||
|
@ -63,6 +65,15 @@ ENABLE_TIMER ?= 0
|
||||||
|
|
||||||
#############################################################
|
#############################################################
|
||||||
PACKED_FILE_SUFFIX = LOSEHU117P6
|
PACKED_FILE_SUFFIX = LOSEHU117P6
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_LAYOUT_KEY_UP_DOWN),1)
|
||||||
|
PACKED_FILE_SUFFIX := $(PACKED_FILE_SUFFIX)LU
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(ENABLE_LAYOUT_KEY_UP_DOWN),2)
|
||||||
|
PACKED_FILE_SUFFIX := $(PACKED_FILE_SUFFIX)LD
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ENABLE_CHINESE_FULL),1)
|
ifeq ($(ENABLE_CHINESE_FULL),1)
|
||||||
$(info font1)
|
$(info font1)
|
||||||
PACKED_FILE_SUFFIX = font1
|
PACKED_FILE_SUFFIX = font1
|
||||||
|
@ -293,7 +304,7 @@ CFLAGS += -Wextra
|
||||||
# 设置PACKED_FILE_SUFFIX,根据ENABLE_CHINESE_FULL的值设置不同的后缀
|
# 设置PACKED_FILE_SUFFIX,根据ENABLE_CHINESE_FULL的值设置不同的后缀
|
||||||
|
|
||||||
CFLAGS += -DENABLE_EEPROM_TYPE=$(ENABLE_EEPROM_TYPE)
|
CFLAGS += -DENABLE_EEPROM_TYPE=$(ENABLE_EEPROM_TYPE)
|
||||||
|
CFLAGS += -DENABLE_LAYOUT_KEY_UP_DOWN=$(ENABLE_LAYOUT_KEY_UP_DOWN)
|
||||||
CFLAGS += -DENABLE_CHINESE_FULL=$(ENABLE_CHINESE_FULL)
|
CFLAGS += -DENABLE_CHINESE_FULL=$(ENABLE_CHINESE_FULL)
|
||||||
CFLAGS += -DPACKED_FILE_SUFFIX=\"$(PACKED_FILE_SUFFIX)\"
|
CFLAGS += -DPACKED_FILE_SUFFIX=\"$(PACKED_FILE_SUFFIX)\"
|
||||||
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
|
CFLAGS += -DPRINTF_INCLUDE_CONFIG_H
|
||||||
|
@ -514,11 +525,20 @@ full:
|
||||||
$(MAKE) build ENABLE_CHINESE_FULL=2
|
$(MAKE) build ENABLE_CHINESE_FULL=2
|
||||||
$(MAKE) build ENABLE_CHINESE_FULL=3
|
$(MAKE) build ENABLE_CHINESE_FULL=3
|
||||||
$(MAKE) build ENABLE_CHINESE_FULL=4
|
$(MAKE) build ENABLE_CHINESE_FULL=4
|
||||||
|
|
||||||
both:
|
both:
|
||||||
$(RM) *.bin
|
$(RM) *.bin
|
||||||
$(MAKE) build ENABLE_CHINESE_FULL=0
|
$(MAKE) build ENABLE_CHINESE_FULL=0
|
||||||
$(MAKE) build ENABLE_CHINESE_FULL=4
|
$(MAKE) build ENABLE_CHINESE_FULL=4
|
||||||
|
|
||||||
|
bothandlayoutkeyupdown:
|
||||||
|
$(RM) *.bin
|
||||||
|
$(MAKE) build ENABLE_CHINESE_FULL=0
|
||||||
|
$(MAKE) build ENABLE_CHINESE_FULL=4
|
||||||
|
$(MAKE) build ENABLE_CHINESE_FULL=0 ENABLE_LAYOUT_KEY_UP_DOWN=1
|
||||||
|
$(MAKE) build ENABLE_CHINESE_FULL=0 ENABLE_LAYOUT_KEY_UP_DOWN=2
|
||||||
|
$(MAKE) build ENABLE_CHINESE_FULL=4 ENABLE_LAYOUT_KEY_UP_DOWN=1
|
||||||
|
$(MAKE) build ENABLE_CHINESE_FULL=4 ENABLE_LAYOUT_KEY_UP_DOWN=2
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(MAKE) build
|
$(MAKE) build
|
||||||
|
|
|
@ -1675,8 +1675,12 @@ static void MENU_Key_UP_DOWN(bool bKeyPressed, bool bKeyHeld, int8_t Direction)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gIsInSubMenu) {
|
if (!gIsInSubMenu) {
|
||||||
|
#if ENABLE_LAYOUT_KEY_UP_DOWN==0
|
||||||
gMenuCursor = NUMBER_AddWithWraparound(gMenuCursor, -Direction, 0, gMenuListCount - 1);
|
gMenuCursor = NUMBER_AddWithWraparound(gMenuCursor, -Direction, 0, gMenuListCount - 1);
|
||||||
|
#endif
|
||||||
|
#if ENABLE_LAYOUT_KEY_UP_DOWN!=0
|
||||||
|
gMenuCursor = NUMBER_AddWithWraparound(gMenuCursor, Direction, 0, gMenuListCount - 1);
|
||||||
|
#endif
|
||||||
gFlagRefreshSetting = true;
|
gFlagRefreshSetting = true;
|
||||||
|
|
||||||
gRequestDisplayScreen = DISPLAY_MENU;
|
gRequestDisplayScreen = DISPLAY_MENU;
|
||||||
|
|
|
@ -70,7 +70,12 @@ static const struct {
|
||||||
{ // Second row
|
{ // Second row
|
||||||
.set_to_zero_mask = ~(1u << GPIOA_PIN_KEYBOARD_5) & 0xffff,
|
.set_to_zero_mask = ~(1u << GPIOA_PIN_KEYBOARD_5) & 0xffff,
|
||||||
.pins = {
|
.pins = {
|
||||||
|
#if ENABLE_LAYOUT_KEY_UP_DOWN!=1
|
||||||
{ .key = KEY_UP, .pin = GPIOA_PIN_KEYBOARD_0},
|
{ .key = KEY_UP, .pin = GPIOA_PIN_KEYBOARD_0},
|
||||||
|
#endif
|
||||||
|
#if ENABLE_LAYOUT_KEY_UP_DOWN==1
|
||||||
|
{ .key = KEY_DOWN, .pin = GPIOA_PIN_KEYBOARD_0},
|
||||||
|
#endif
|
||||||
{ .key = KEY_2, .pin = GPIOA_PIN_KEYBOARD_1},
|
{ .key = KEY_2, .pin = GPIOA_PIN_KEYBOARD_1},
|
||||||
{ .key = KEY_5, .pin = GPIOA_PIN_KEYBOARD_2},
|
{ .key = KEY_5, .pin = GPIOA_PIN_KEYBOARD_2},
|
||||||
{ .key = KEY_8, .pin = GPIOA_PIN_KEYBOARD_3}
|
{ .key = KEY_8, .pin = GPIOA_PIN_KEYBOARD_3}
|
||||||
|
@ -79,7 +84,12 @@ static const struct {
|
||||||
{ // Third row
|
{ // Third row
|
||||||
.set_to_zero_mask = ~(1u << GPIOA_PIN_KEYBOARD_6) & 0xffff,
|
.set_to_zero_mask = ~(1u << GPIOA_PIN_KEYBOARD_6) & 0xffff,
|
||||||
.pins = {
|
.pins = {
|
||||||
|
#if ENABLE_LAYOUT_KEY_UP_DOWN!=1
|
||||||
{ .key = KEY_DOWN, .pin = GPIOA_PIN_KEYBOARD_0},
|
{ .key = KEY_DOWN, .pin = GPIOA_PIN_KEYBOARD_0},
|
||||||
|
#endif
|
||||||
|
#if ENABLE_LAYOUT_KEY_UP_DOWN==1
|
||||||
|
{ .key = KEY_UP, .pin = GPIOA_PIN_KEYBOARD_0},
|
||||||
|
#endif
|
||||||
{ .key = KEY_3, .pin = GPIOA_PIN_KEYBOARD_1},
|
{ .key = KEY_3, .pin = GPIOA_PIN_KEYBOARD_1},
|
||||||
{ .key = KEY_6, .pin = GPIOA_PIN_KEYBOARD_2},
|
{ .key = KEY_6, .pin = GPIOA_PIN_KEYBOARD_2},
|
||||||
{ .key = KEY_9, .pin = GPIOA_PIN_KEYBOARD_3}
|
{ .key = KEY_9, .pin = GPIOA_PIN_KEYBOARD_3}
|
||||||
|
|
Loading…
Reference in a new issue