Skip to content

Commit

Permalink
Fix conflicting types for 'tfp_printf' (qmk#8269)
Browse files Browse the repository at this point in the history
* Refactor to use mpaland/printf

* trim firmware size

* remove keymap changes

* run clang format

* Fixup after rebase

* fix up git-submodule command for printf
  • Loading branch information
zvecr authored May 4, 2020
1 parent f31bf1b commit e17b55e
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 356 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "lib/lufa"]
path = lib/lufa
url = https://github.com/qmk/lufa
[submodule "lib/printf"]
path = lib/printf
url = https://github.com/mpaland/printf.git
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ ifndef SKIP_GIT
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
if [ ! -e lib/printf ]; then git submodule sync lib/printf && git submodule update --depth 50 --init lib/printf; fi
git submodule status --recursive 2>/dev/null | \
while IFS= read -r x; do \
case "$$x" in \
Expand Down
1 change: 1 addition & 0 deletions lib/printf
Submodule printf added at d3b984
9 changes: 8 additions & 1 deletion tmk_core/common.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
PRINTF_PATH = $(LIB_PATH)/printf

COMMON_DIR = common
PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY)

Expand All @@ -21,7 +23,12 @@ TMK_COMMON_SRC += $(COMMON_DIR)/host.c \
ifeq ($(PLATFORM),AVR)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/xprintf.S
else ifeq ($(PLATFORM),CHIBIOS)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
TMK_COMMON_SRC += $(PRINTF_PATH)/printf.c
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_FLOAT
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG
TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T
VPATH += $(PRINTF_PATH)
else ifeq ($(PLATFORM),ARM_ATSAM)
TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/printf.c
endif
Expand Down
233 changes: 0 additions & 233 deletions tmk_core/common/chibios/printf.c

This file was deleted.

110 changes: 0 additions & 110 deletions tmk_core/common/chibios/printf.h

This file was deleted.

Loading

0 comments on commit e17b55e

Please sign in to comment.