summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/mimxrt/main.c24
-rw-r--r--ports/mimxrt/mpconfigport.h3
2 files changed, 27 insertions, 0 deletions
diff --git a/ports/mimxrt/main.c b/ports/mimxrt/main.c
index 7832afffc..387c96ef3 100644
--- a/ports/mimxrt/main.c
+++ b/ports/mimxrt/main.c
@@ -108,3 +108,27 @@ void MP_WEAK __assert_func(const char *file, int line, const char *func, const c
}
}
#endif
+
+const char mimxrt_help_text[] =
+ "Welcome to MicroPython!\n"
+ "\n"
+ "For online help please visit https://micropython.org/help/.\n"
+ "\n"
+ "For access to the hardware use the 'machine' module. \n"
+ "\n"
+ "Quick overview of some objects:\n"
+ " machine.Pin(pin) -- get a pin, eg machine.Pin(0)\n"
+ " machine.Pin(pin, m, [p]) -- get a pin and configure it for IO mode m, pull mode p\n"
+ " methods: init(..), value([v]), high(), low())\n"
+ "\n"
+ "Pin IO modes are: Pin.IN, Pin.OUT\n"
+ "Pin pull modes are: Pin.PULL_UP, Pin.PULL_UP_47K, Pin.PULL_UP_22K, Pin.PULL_DOWN, Pin.PULL_HOLD\n"
+ "\n"
+ "Useful control commands:\n"
+ " CTRL-C -- interrupt a running program\n"
+ " CTRL-D -- on a blank line, do a soft reset of the board\n"
+ " CTRL-E -- on a blank line, enter paste mode\n"
+ "\n"
+ "For further help on a specific object, type help(obj)\n"
+ "For a list of available modules, type help('modules')\n"
+;
diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h
index e6b15e1b7..72e804f67 100644
--- a/ports/mimxrt/mpconfigport.h
+++ b/ports/mimxrt/mpconfigport.h
@@ -43,6 +43,7 @@
#define MICROPY_ENABLE_GC (1)
#define MICROPY_KBD_EXCEPTION (1)
#define MICROPY_HELPER_REPL (1)
+#define MICROPY_REPL_AUTO_INDENT (1)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_ENABLE_SOURCE_LINE (1)
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_TERSE)
@@ -59,6 +60,8 @@
#define MICROPY_PY_BUILTINS_REVERSED (1)
#define MICROPY_PY_BUILTINS_MIN_MAX (0)
#define MICROPY_PY_BUILTINS_HELP (1)
+#define MICROPY_PY_BUILTINS_HELP_MODULES (1)
+#define MICROPY_PY_BUILTINS_HELP_TEXT mimxrt_help_text
#define MICROPY_PY___FILE__ (0)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)