summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/help.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-01-21 23:21:37 +1100
committerDamien George <damien.p.george@gmail.com>2017-01-22 11:56:16 +1100
commit8678e3edfd8f56b90d0847ba0a9a6ba615463152 (patch)
treea9f97e7ccd19de67c4b385253f9aef82f52ec69b /stmhal/help.c
parent9f04dfb568b8af339ec34ea1a94fb2eb8890bf8c (diff)
downloadmicropython-8678e3edfd8f56b90d0847ba0a9a6ba615463152.tar.gz
micropython-8678e3edfd8f56b90d0847ba0a9a6ba615463152.zip
stmhal: Convert to use builtin help function.
Diffstat (limited to 'stmhal/help.c')
-rw-r--r--stmhal/help.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/stmhal/help.c b/stmhal/help.c
index 21e81ebc0e..1d4803f750 100644
--- a/stmhal/help.c
+++ b/stmhal/help.c
@@ -24,11 +24,9 @@
* THE SOFTWARE.
*/
-#include <stdio.h>
+#include "py/builtin.h"
-#include "lib/utils/pyhelp.h"
-
-STATIC const char *help_text =
+const char *stmhal_help_text =
"Welcome to MicroPython!\n"
"\n"
"For online help please visit http://micropython.org/help/.\n"
@@ -70,17 +68,3 @@ STATIC const char *help_text =
"\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);