sys/shell: hide random commands behind random_cmd pseudo-module
These commands cost 248 bytes of memory, we don't want to always include them when the `random` module is selected.
This commit is contained in:
parent
4c03d10f7b
commit
f362a19eed
@ -119,6 +119,7 @@ PSEUDOMODULES += printf_float
|
|||||||
PSEUDOMODULES += prng
|
PSEUDOMODULES += prng
|
||||||
PSEUDOMODULES += prng_%
|
PSEUDOMODULES += prng_%
|
||||||
PSEUDOMODULES += fortuna_reseed
|
PSEUDOMODULES += fortuna_reseed
|
||||||
|
PSEUDOMODULES += random_cmd
|
||||||
PSEUDOMODULES += riotboot_%
|
PSEUDOMODULES += riotboot_%
|
||||||
PSEUDOMODULES += rtt_cmd
|
PSEUDOMODULES += rtt_cmd
|
||||||
PSEUDOMODULES += saul_adc
|
PSEUDOMODULES += saul_adc
|
||||||
|
|||||||
@ -29,7 +29,7 @@ endif
|
|||||||
ifneq (,$(filter lpc2387,$(USEMODULE)))
|
ifneq (,$(filter lpc2387,$(USEMODULE)))
|
||||||
SRC += sc_heap.c
|
SRC += sc_heap.c
|
||||||
endif
|
endif
|
||||||
ifneq (,$(filter random,$(USEMODULE)))
|
ifneq (,$(filter random_cmd,$(USEMODULE)))
|
||||||
SRC += sc_random.c
|
SRC += sc_random.c
|
||||||
endif
|
endif
|
||||||
ifneq (,$(filter at30tse75x,$(USEMODULE)))
|
ifneq (,$(filter at30tse75x,$(USEMODULE)))
|
||||||
|
|||||||
@ -86,7 +86,7 @@ extern int _gnrc_icmpv6_ping(int argc, char **argv);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODULE_RANDOM
|
#ifdef MODULE_RANDOM_CMD
|
||||||
extern int _random_init(int argc, char **argv);
|
extern int _random_init(int argc, char **argv);
|
||||||
extern int _random_get(int argc, char **argv);
|
extern int _random_get(int argc, char **argv);
|
||||||
#endif
|
#endif
|
||||||
@ -250,7 +250,7 @@ const shell_command_t _shell_command_list[] = {
|
|||||||
{ "ping", "Alias for ping6", _gnrc_icmpv6_ping },
|
{ "ping", "Alias for ping6", _gnrc_icmpv6_ping },
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef MODULE_RANDOM
|
#ifdef MODULE_RANDOM_CMD
|
||||||
{ "random_init", "initializes the PRNG", _random_init },
|
{ "random_init", "initializes the PRNG", _random_init },
|
||||||
{ "random_get", "returns 32 bit of pseudo randomness", _random_get },
|
{ "random_get", "returns 32 bit of pseudo randomness", _random_get },
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -9,6 +9,7 @@ CFLAGS += -DTHREAD_STACKSIZE_MAIN=\($(MAIN_THREAD_SIZE)\)
|
|||||||
|
|
||||||
USEMODULE += fmt
|
USEMODULE += fmt
|
||||||
USEMODULE += random
|
USEMODULE += random
|
||||||
|
USEMODULE += random_cmd
|
||||||
USEMODULE += shell
|
USEMODULE += shell
|
||||||
USEMODULE += xtimer
|
USEMODULE += xtimer
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user