Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
739465c0
Commit
739465c0
authored
8 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
teensy: Convert to use builtin help function.
parent
4d7fba83
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
teensy/Makefile
+0
-1
0 additions, 1 deletion
teensy/Makefile
teensy/help.c
+2
-19
2 additions, 19 deletions
teensy/help.c
teensy/mpconfigport.h
+3
-1
3 additions, 1 deletion
teensy/mpconfigport.h
with
5 additions
and
21 deletions
teensy/Makefile
+
0
−
1
View file @
739465c0
...
...
@@ -109,7 +109,6 @@ LIB_SRC_C = $(addprefix lib/,\
libc/string0.c
\
mp-readline/readline.c
\
utils/pyexec.c
\
utils/pyhelp.c
\
)
SRC_TEENSY
=
$(
addprefix core/,
\
...
...
This diff is collapsed.
Click to expand it.
teensy/help.c
+
2
−
19
View file @
739465c0
...
...
@@ -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
*
teensy_help_text
=
"Welcome to MicroPython!
\n
"
"
\n
"
"For online help please visit http://micropython.org/help/.
\n
"
...
...
@@ -69,18 +67,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
);
This diff is collapsed.
Click to expand it.
teensy/mpconfigport.h
+
3
−
1
View file @
739465c0
...
...
@@ -14,6 +14,9 @@
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_OPT_COMPUTED_GOTO (1)
#define MICROPY_PY_BUILTINS_HELP (1)
#define MICROPY_PY_BUILTINS_HELP_TEXT teensy_help_text
#define MICROPY_PY_IO (0)
#define MICROPY_PY_FROZENSET (1)
#define MICROPY_PY_SYS_EXIT (1)
...
...
@@ -28,7 +31,6 @@
// extra built in names to add to the global namespace
#define MICROPY_PORT_BUILTINS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_help), (mp_obj_t)&mp_builtin_help_obj }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
// extra built in modules to add to the list of known ones
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment