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
6ff0ecff
Commit
6ff0ecff
authored
Jun 01, 2017
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ports: Convert from using stmhal's input() to core provided version.
parent
bc76302e
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
4 additions
and
52 deletions
+4
-52
cc3200/application.mk
cc3200/application.mk
+0
-1
cc3200/mpconfigport.h
cc3200/mpconfigport.h
+1
-1
esp8266/Makefile
esp8266/Makefile
+0
-1
esp8266/mpconfigport.h
esp8266/mpconfigport.h
+1
-1
stmhal/Makefile
stmhal/Makefile
+0
-1
stmhal/input.c
stmhal/input.c
+0
-44
stmhal/mpconfigport.h
stmhal/mpconfigport.h
+1
-1
teensy/Makefile
teensy/Makefile
+0
-1
teensy/mpconfigport.h
teensy/mpconfigport.h
+1
-1
No files found.
cc3200/application.mk
View file @
6ff0ecff
...
...
@@ -151,7 +151,6 @@ APP_LIB_SRC_C = $(addprefix lib/,\
APP_STM_SRC_C
=
$(
addprefix
stmhal/,
\
bufhelper.c
\
input.c
\
irq.c
\
pybstdio.c
\
)
...
...
cc3200/mpconfigport.h
View file @
6ff0ecff
...
...
@@ -80,6 +80,7 @@
#define MICROPY_VFS_FAT (1)
#define MICROPY_PY_ASYNC_AWAIT (0)
#define MICROPY_PY_ALL_SPECIAL_METHODS (1)
#define MICROPY_PY_BUILTINS_INPUT (1)
#define MICROPY_PY_BUILTINS_HELP (1)
#define MICROPY_PY_BUILTINS_HELP_TEXT cc3200_help_text
#ifndef DEBUG
...
...
@@ -142,7 +143,6 @@
// extra built in names to add to the global namespace
#define MICROPY_PORT_BUILTINS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj }, \
// extra built in modules to add to the list of known ones
...
...
esp8266/Makefile
View file @
6ff0ecff
...
...
@@ -94,7 +94,6 @@ SRC_C = \
STM_SRC_C
=
$(
addprefix
stmhal/,
\
pybstdio.c
\
input.c
\
)
EXTMOD_SRC_C
=
$(
addprefix
extmod/,
\
...
...
esp8266/mpconfigport.h
View file @
6ff0ecff
...
...
@@ -39,6 +39,7 @@
#define MICROPY_PY_BUILTINS_SLICE (1)
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (1)
#define MICROPY_PY_BUILTINS_PROPERTY (1)
#define MICROPY_PY_BUILTINS_INPUT (1)
#define MICROPY_PY_BUILTINS_HELP (1)
#define MICROPY_PY_BUILTINS_HELP_TEXT esp_help_text
#define MICROPY_PY_BUILTINS_HELP_MODULES (1)
...
...
@@ -147,7 +148,6 @@ void *esp_native_code_commit(void*, size_t);
// extra built in names to add to the global namespace
#define MICROPY_PORT_BUILTINS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
// extra built in modules to add to the list of known ones
...
...
stmhal/Makefile
View file @
6ff0ecff
...
...
@@ -147,7 +147,6 @@ SRC_C = \
gccollect.c
\
pybstdio.c
\
help.c
\
input.c
\
machine_i2c.c
\
modmachine.c
\
modpyb.c
\
...
...
stmhal/input.c
deleted
100644 → 0
View file @
bc76302e
/*
* This file is part of the Micro Python project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013, 2014 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/nlr.h"
#include "py/obj.h"
#include "lib/mp-readline/readline.h"
STATIC
mp_obj_t
mp_builtin_input
(
uint
n_args
,
const
mp_obj_t
*
args
)
{
if
(
n_args
==
1
)
{
mp_obj_print
(
args
[
0
],
PRINT_STR
);
}
vstr_t
line
;
vstr_init
(
&
line
,
16
);
int
ret
=
readline
(
&
line
,
""
);
if
(
line
.
len
==
0
&&
ret
==
CHAR_CTRL_D
)
{
nlr_raise
(
mp_obj_new_exception
(
&
mp_type_EOFError
));
}
return
mp_obj_new_str_from_vstr
(
&
mp_type_str
,
&
line
);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN
(
mp_builtin_input_obj
,
0
,
1
,
mp_builtin_input
);
stmhal/mpconfigport.h
View file @
6ff0ecff
...
...
@@ -87,6 +87,7 @@
#define MICROPY_PY_ALL_SPECIAL_METHODS (1)
#define MICROPY_PY_BUILTINS_COMPILE (1)
#define MICROPY_PY_BUILTINS_EXECFILE (1)
#define MICROPY_PY_BUILTINS_INPUT (1)
#define MICROPY_PY_BUILTINS_POW3 (1)
#define MICROPY_PY_BUILTINS_HELP (1)
#define MICROPY_PY_BUILTINS_HELP_TEXT stmhal_help_text
...
...
@@ -159,7 +160,6 @@
// extra built in names to add to the global namespace
#define MICROPY_PORT_BUILTINS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
// extra built in modules to add to the list of known ones
...
...
teensy/Makefile
View file @
6ff0ecff
...
...
@@ -93,7 +93,6 @@ SRC_C = \
STM_SRC_C
=
$(
addprefix
stmhal/,
\
gccollect.c
\
input.c
\
irq.c
\
pin.c
\
pin_named_pins.c
\
...
...
teensy/mpconfigport.h
View file @
6ff0ecff
...
...
@@ -14,6 +14,7 @@
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
#define MICROPY_OPT_COMPUTED_GOTO (1)
#define MICROPY_PY_BUILTINS_INPUT (1)
#define MICROPY_PY_BUILTINS_HELP (1)
#define MICROPY_PY_BUILTINS_HELP_TEXT teensy_help_text
...
...
@@ -31,7 +32,6 @@
// extra built in names to add to the global namespace
#define MICROPY_PORT_BUILTINS \
{ 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
extern
const
struct
_mp_obj_module_t
os_module
;
...
...
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