Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
fdaf2b80
Commit
fdaf2b80
authored
May 06, 2021
by
robert-hh
Committed by
Damien George
Jun 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mimxrt: Add custom help text and enable help("modules").
parent
c5d2095e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
ports/mimxrt/main.c
ports/mimxrt/main.c
+24
-0
ports/mimxrt/mpconfigport.h
ports/mimxrt/mpconfigport.h
+3
-0
No files found.
ports/mimxrt/main.c
View file @
fdaf2b80
...
...
@@ -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
"
;
ports/mimxrt/mpconfigport.h
View file @
fdaf2b80
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment