mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
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 += fortuna_reseed
|
||||
PSEUDOMODULES += random_cmd
|
||||
PSEUDOMODULES += riotboot_%
|
||||
PSEUDOMODULES += rtt_cmd
|
||||
PSEUDOMODULES += saul_adc
|
||||
|
@ -29,7 +29,7 @@ endif
|
||||
ifneq (,$(filter lpc2387,$(USEMODULE)))
|
||||
SRC += sc_heap.c
|
||||
endif
|
||||
ifneq (,$(filter random,$(USEMODULE)))
|
||||
ifneq (,$(filter random_cmd,$(USEMODULE)))
|
||||
SRC += sc_random.c
|
||||
endif
|
||||
ifneq (,$(filter at30tse75x,$(USEMODULE)))
|
||||
|
@ -86,7 +86,7 @@ extern int _gnrc_icmpv6_ping(int argc, char **argv);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_RANDOM
|
||||
#ifdef MODULE_RANDOM_CMD
|
||||
extern int _random_init(int argc, char **argv);
|
||||
extern int _random_get(int argc, char **argv);
|
||||
#endif
|
||||
@ -250,7 +250,7 @@ const shell_command_t _shell_command_list[] = {
|
||||
{ "ping", "Alias for ping6", _gnrc_icmpv6_ping },
|
||||
#endif
|
||||
#endif
|
||||
#ifdef MODULE_RANDOM
|
||||
#ifdef MODULE_RANDOM_CMD
|
||||
{ "random_init", "initializes the PRNG", _random_init },
|
||||
{ "random_get", "returns 32 bit of pseudo randomness", _random_get },
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@ CFLAGS += -DTHREAD_STACKSIZE_MAIN=\($(MAIN_THREAD_SIZE)\)
|
||||
|
||||
USEMODULE += fmt
|
||||
USEMODULE += random
|
||||
USEMODULE += random_cmd
|
||||
USEMODULE += shell
|
||||
USEMODULE += xtimer
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user