1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 17:12:43 +01:00

sys: add pseudomodule scanf_float

To read float number from stdin, add "-u scanf_float"
option to the linker.
This option is setup using a pseudomodule as it is already done for
printf_float.
Just add to your Makefile:
USEMODULE += scanf_float

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
This commit is contained in:
Gilles DOFFE 2019-05-12 10:19:40 +02:00
parent 1dc479de00
commit 7fc3207043
2 changed files with 7 additions and 0 deletions

View File

@ -65,6 +65,7 @@ PSEUDOMODULES += saul_adc
PSEUDOMODULES += saul_default PSEUDOMODULES += saul_default
PSEUDOMODULES += saul_gpio PSEUDOMODULES += saul_gpio
PSEUDOMODULES += saul_nrf_temperature PSEUDOMODULES += saul_nrf_temperature
PSEUDOMODULES += scanf_float
PSEUDOMODULES += schedstatistics PSEUDOMODULES += schedstatistics
PSEUDOMODULES += sock PSEUDOMODULES += sock
PSEUDOMODULES += sock_ip PSEUDOMODULES += sock_ip

View File

@ -77,6 +77,12 @@ ifneq (,$(filter printf_float,$(USEMODULE)))
endif endif
endif endif
ifneq (,$(filter scanf_float,$(USEMODULE)))
ifeq (1,$(USE_NANO_SPECS))
export LINKFLAGS += -u _scanf_float
endif
endif
ifneq (,$(filter riotboot,$(FEATURES_USED))) ifneq (,$(filter riotboot,$(FEATURES_USED)))
include $(RIOTBASE)/sys/riotboot/Makefile.include include $(RIOTBASE)/sys/riotboot/Makefile.include
endif endif