diff options
author | Damien George <damien.p.george@gmail.com> | 2017-01-22 10:18:25 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-01-22 11:56:16 +1100 |
commit | 4d7fba83a6192df95f8728e87d5923b11c29ece6 (patch) | |
tree | 63195ff98e41b8e7f7c50ba042b6e383a140d7da /cc3200/misc/help.c | |
parent | 4ccd899e65e0aabf445f9cff6b857414eafbbb59 (diff) | |
download | micropython-4d7fba83a6192df95f8728e87d5923b11c29ece6.tar.gz micropython-4d7fba83a6192df95f8728e87d5923b11c29ece6.zip |
cc3200: Convert to use builtin help function.
Diffstat (limited to 'cc3200/misc/help.c')
-rw-r--r-- | cc3200/misc/help.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/cc3200/misc/help.c b/cc3200/misc/help.c index 4601818bda..cce515898e 100644 --- a/cc3200/misc/help.c +++ b/cc3200/misc/help.c @@ -25,23 +25,8 @@ * THE SOFTWARE. */ -#include <stdio.h> +#include "py/builtin.h" -#include "lib/utils/pyhelp.h" - -STATIC const char help_text[] = "Welcome to MicroPython!\n" +const char *cc3200_help_text = "Welcome to MicroPython!\n" "For online help please visit http://micropython.org/help/.\n" "For further help on a specific object, type help(obj)\n"; - -STATIC mp_obj_t pyb_help(uint n_args, const mp_obj_t *args) { - if (n_args == 0) { - // print a general help message - printf("%s", help_text); - } - else { - // try to print something sensible about the given object - pyhelp_print_obj(args[0]); - } - return mp_const_none; -} -MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_help_obj, 0, 1, pyb_help); |