Skip to content

Commit 9abf176

Browse files
authored
Fix conflicting types for 'tfp_printf' (qmk#8269)
* Refactor to use mpaland/printf * trim firmware size * remove keymap changes * run clang format * Fixup after rebase * fix up git-submodule command for printf
1 parent f5b08b7 commit 9abf176

File tree

10 files changed

+16
-356
lines changed

10 files changed

+16
-356
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
[submodule "lib/lufa"]
1717
path = lib/lufa
1818
url = https://github.com/qmk/lufa
19+
[submodule "lib/printf"]
20+
path = lib/printf
21+
url = https://github.com/mpaland/printf.git

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ ifndef SKIP_GIT
567567
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
568568
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
569569
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
570+
if [ ! -e lib/printf ]; then git submodule sync lib/printf && git submodule update --depth 50 --init lib/printf; fi
570571
git submodule status --recursive 2>/dev/null | \
571572
while IFS= read -r x; do \
572573
case "$$x" in \

lib/printf

Submodule printf added at d3b9846

tmk_core/common.mk

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
PRINTF_PATH = $(LIB_PATH)/printf
2+
13
COMMON_DIR = common
24
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)
35

@@ -21,7 +23,12 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
2123
ifeq ($(PLATFORM),AVR)
2224
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S
2325
else ifeq ($(PLATFORM),CHIBIOS)
24-
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
26+
TMK_COMMON_SRC += $(PRINTF_PATH)/printf.c
27+
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_FLOAT
28+
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL
29+
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG
30+
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T
31+
VPATH += $(PRINTF_PATH)
2532
else ifeq ($(PLATFORM),ARM_ATSAM)
2633
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
2734
endif

tmk_core/common/chibios/printf.c

Lines changed: 0 additions & 233 deletions
This file was deleted.

tmk_core/common/chibios/printf.h

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)