Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
tools-mirror
Micropython
提交
ca16c382
M
Micropython
项目概览
tools-mirror
/
Micropython
12 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
Micropython
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ca16c382
编写于
5月 29, 2017
作者:
V
Ville Skyttä
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
various: Spelling fixes
上级
e5e49bed
变更
41
隐藏空白更改
内联
并排
Showing
41 changed file
with
49 addition
and
49 deletion
+49
-49
cc3200/README.md
cc3200/README.md
+1
-1
docs/library/btree.rst
docs/library/btree.rst
+1
-1
docs/library/machine.SD.rst
docs/library/machine.SD.rst
+1
-1
docs/library/machine.UART.rst
docs/library/machine.UART.rst
+1
-1
docs/library/uhashlib.rst
docs/library/uhashlib.rst
+2
-2
docs/library/utime.rst
docs/library/utime.rst
+2
-2
docs/sphinx_selective_exclude/README.md
docs/sphinx_selective_exclude/README.md
+1
-1
docs/sphinx_selective_exclude/modindex_exclude.py
docs/sphinx_selective_exclude/modindex_exclude.py
+1
-1
esp8266/README.md
esp8266/README.md
+1
-1
esp8266/machine_rtc.c
esp8266/machine_rtc.c
+1
-1
examples/conwaylife.py
examples/conwaylife.py
+2
-2
examples/embedding/Makefile.upylib
examples/embedding/Makefile.upylib
+1
-1
examples/embedding/README.md
examples/embedding/README.md
+1
-1
extmod/modlwip.c
extmod/modlwip.c
+2
-2
extmod/modwebsocket.c
extmod/modwebsocket.c
+1
-1
lib/timeutils/timeutils.c
lib/timeutils/timeutils.c
+1
-1
lib/utils/stdout_helpers.c
lib/utils/stdout_helpers.c
+1
-1
py/asmthumb.c
py/asmthumb.c
+1
-1
py/builtinimport.c
py/builtinimport.c
+2
-2
py/compile.c
py/compile.c
+2
-2
py/misc.h
py/misc.h
+1
-1
py/mkenv.mk
py/mkenv.mk
+1
-1
py/mpconfig.h
py/mpconfig.h
+1
-1
py/obj.c
py/obj.c
+1
-1
py/objstr.c
py/objstr.c
+2
-2
py/py.mk
py/py.mk
+1
-1
py/ringbuf.h
py/ringbuf.h
+1
-1
py/stream.c
py/stream.c
+1
-1
py/vm.c
py/vm.c
+2
-2
qemu-arm/README.md
qemu-arm/README.md
+1
-1
tests/basics/namedtuple1.py
tests/basics/namedtuple1.py
+1
-1
tests/basics/try_reraise2.py
tests/basics/try_reraise2.py
+1
-1
tests/pyb/can.py
tests/pyb/can.py
+1
-1
tests/thread/stress_aes.py
tests/thread/stress_aes.py
+1
-1
tests/wipy/uart.py
tests/wipy/uart.py
+1
-1
tools/insert-usb-ids.py
tools/insert-usb-ids.py
+1
-1
tools/pyboard.py
tools/pyboard.py
+1
-1
unix/Makefile
unix/Makefile
+1
-1
unix/modsocket.c
unix/modsocket.c
+1
-1
windows/windows_mphal.c
windows/windows_mphal.c
+1
-1
zephyr/modutime.c
zephyr/modutime.c
+1
-1
未找到文件。
cc3200/README.md
浏览文件 @
ca16c382
...
...
@@ -138,7 +138,7 @@ If `WIPY_IP`, `WIPY_USER` or `WIPY_PWD` are omitted the default values (the ones
## Regarding old revisions of the CC3200-LAUNCHXL
First silicon (pre-release) revisions of the CC3200 had issues with the ram blocks, and MicroPython cannot run
there. Make sure to use a
**v4.1 (or higer) LAUNCHXL board**
when trying this port, otherwise it won't work.
there. Make sure to use a
**v4.1 (or hig
h
er) LAUNCHXL board**
when trying this port, otherwise it won't work.
### Note regarding FileZilla
...
...
docs/library/btree.rst
浏览文件 @
ca16c382
...
...
@@ -69,7 +69,7 @@ Functions
Open a database from a random-access `stream` (like an open file). All
other parameters are optional and keyword-only, and allow to tweak advanced
paramters of the database operation (most users will not need them):
param
e
ters of the database operation (most users will not need them):
* `flags` - Currently unused.
* `cachesize` - Suggested maximum memory cache size in bytes. For a
...
...
docs/library/machine.SD.rst
浏览文件 @
ca16c382
...
...
@@ -34,7 +34,7 @@ Methods
.. method:: SD.init(id=0, pins=('GP10', 'GP11', 'GP15'))
Enable the SD card. In order to initalize the card, give it a 3-tuple:
Enable the SD card. In order to init
i
alize the card, give it a 3-tuple:
``(clk_pin, cmd_pin, dat0_pin)``.
.. method:: SD.deinit()
...
...
docs/library/machine.UART.rst
浏览文件 @
ca16c382
...
...
@@ -16,7 +16,7 @@ UART objects can be created and initialised using::
uart = UART(1, 9600) # init with given baudrate
uart.init(9600, bits=8, parity=None, stop=1) # init with given parameters
Supported paramters differ on a board:
Supported param
e
ters differ on a board:
Pyboard: Bits can be 7, 8 or 9. Stop can be 1 or 2. With `parity=None`,
only 8 and 9 bits are supported. With parity enabled, only 7 and 8 bits
...
...
docs/library/uhashlib.rst
浏览文件 @
ca16c382
...
...
@@ -15,11 +15,11 @@ be implemented:
* SHA1 - A previous generation algorithm. Not recommended for new usages,
but SHA1 is a part of number of Internet standards and existing
applications, so boards target
t
ing network connectivity and
applications, so boards targeting network connectivity and
interoperatiability will try to provide this.
* MD5 - A legacy algorithm, not considered cryptographically secure. Only
selected boards, target
t
ing interoperatibility with legacy applications,
selected boards, targeting interoperatibility with legacy applications,
will offer this.
Constructors
...
...
docs/library/utime.rst
浏览文件 @
ca16c382
...
...
@@ -146,8 +146,8 @@ Functions
too distant inbetween, see below). The function returns **signed** value in the range
[``-TICKS_PERIOD/2`` .. ``TICKS_PERIOD/2-1``] (that's a typical range definition for
two's-complement signed binary integers). If the result is negative, it means that
``ticks1`` occured earlier in time than ``ticks2``. Otherwise, it means that
``ticks1`` occured after ``ticks2``. This holds ``only`` if ``ticks1`` and ``ticks2``
``ticks1`` occur
r
ed earlier in time than ``ticks2``. Otherwise, it means that
``ticks1`` occur
r
ed after ``ticks2``. This holds ``only`` if ``ticks1`` and ``ticks2``
are apart from each other for no more than ``TICKS_PERIOD/2-1`` ticks. If that does
not hold, incorrect result will be returned. Specifically, if two tick values are
apart for ``TICKS_PERIOD/2-1`` ticks, that value will be returned by the function.
...
...
docs/sphinx_selective_exclude/README.md
浏览文件 @
ca16c382
...
...
@@ -66,7 +66,7 @@ index for PDF, just the same as for HTML.
search_auto_exclude
-------------------
Even if you exclude so
em
documents from toctree:: using only::
Even if you exclude so
me
documents from toctree:: using only::
directive, they will be indexed for full-text search, so user may
find them and get confused. This plugin follows very simple idea
that if you didn't include some documents in the toctree, then
...
...
docs/sphinx_selective_exclude/modindex_exclude.py
浏览文件 @
ca16c382
...
...
@@ -2,7 +2,7 @@
# This is a Sphinx documentation tool extension which allows to
# exclude some Python modules from the generated indexes. Modules
# are excluded both from "modindex" and "genindex" index tables
# (in the latter case, all members of a module are ex
lc
uded).
# (in the latter case, all members of a module are ex
cl
uded).
# To control exclusion, set "modindex_exclude" variable in Sphinx
# conf.py to the list of modules to exclude. Note: these should be
# modules (as defined by py:module directive, not just raw filenames).
...
...
esp8266/README.md
浏览文件 @
ca16c382
...
...
@@ -100,7 +100,7 @@ programming).
__WiFi__
Initally, the device configures itself as a WiFi access point (AP).
Init
i
ally, the device configures itself as a WiFi access point (AP).
-
ESSID: MicroPython-xxxxxx (x’s are replaced with part of the MAC address).
-
Password: micropythoN (note the upper-case N).
-
IP address of the board: 192.168.4.1.
...
...
esp8266/machine_rtc.c
浏览文件 @
ca16c382
...
...
@@ -93,7 +93,7 @@ void pyb_rtc_set_us_since_2000(uint64_t nowus) {
int64_t
delta
=
nowus
-
(((
uint64_t
)
rtc_last_ticks
*
cal
)
>>
12
);
// As the calibration value jitters quite a bit, to make the
// clock at least somewhat practially usable, we need to store it
// clock at least somewhat practi
c
ally usable, we need to store it
system_rtc_mem_write
(
MEM_CAL_ADDR
,
&
cal
,
sizeof
(
cal
));
system_rtc_mem_write
(
MEM_DELTA_ADDR
,
&
delta
,
sizeof
(
delta
));
};
...
...
examples/conwaylife.py
浏览文件 @
ca16c382
...
...
@@ -8,7 +8,7 @@ lcd.light(1)
def
conway_step
():
for
x
in
range
(
128
):
# loop over x coordinates
for
y
in
range
(
32
):
# loop over y coordinates
# count number of neigbours
# count number of neig
h
bours
num_neighbours
=
(
lcd
.
get
(
x
-
1
,
y
-
1
)
+
lcd
.
get
(
x
,
y
-
1
)
+
lcd
.
get
(
x
+
1
,
y
-
1
)
+
...
...
@@ -25,7 +25,7 @@ def conway_step():
if
self
and
not
(
2
<=
num_neighbours
<=
3
):
lcd
.
pixel
(
x
,
y
,
0
)
# not enough, or too many neighbours: cell dies
elif
not
self
and
num_neighbours
==
3
:
lcd
.
pixel
(
x
,
y
,
1
)
# exactly 3 neigbours around an empty cell: cell is born
lcd
.
pixel
(
x
,
y
,
1
)
# exactly 3 neig
h
bours around an empty cell: cell is born
# randomise the start
def
conway_rand
():
...
...
examples/embedding/Makefile.upylib
浏览文件 @
ca16c382
...
...
@@ -170,7 +170,7 @@ SRC_QSTR_AUTO_DEPS +=
include
$(MPTOP)/py/mkrules.mk
# Value of configure's --host= option (required for cross-compilation).
# Deduce it from CROSS_COMPILE by default, but can be overriden.
# Deduce it from CROSS_COMPILE by default, but can be overrid
d
en.
ifneq
($(CROSS_COMPILE),)
CROSS_COMPILE_HOST
=
--host
=
$(
patsubst
%-,%,
$(CROSS_COMPILE)
)
else
...
...
examples/embedding/README.md
浏览文件 @
ca16c382
...
...
@@ -18,7 +18,7 @@ Building the example is as simple as running:
It's worth to trace what's happening behind the scenes though:
1.
As a first step, a MicroPython library is built. This is handled by a
sep
e
rate makefile, Makefile.upylib. It is more or less complex, but the
sep
a
rate makefile, Makefile.upylib. It is more or less complex, but the
good news is that you won't need to change anything in it, just use it
as is, the main Makefile shows how. What may require editing though is
a MicroPython configuration file. MicroPython is highly configurable, so
...
...
extmod/modlwip.c
浏览文件 @
ca16c382
...
...
@@ -373,7 +373,7 @@ STATIC err_t _lwip_tcp_recv(void *arg, struct tcp_pcb *tcpb, struct pbuf *p, err
}
/*******************************************************************************/
// Functions for socket send/rec
ie
ve operations. Socket send/recv and friends call
// Functions for socket send/rec
ei
ve operations. Socket send/recv and friends call
// these to do the work.
// Helper function for send/sendto to handle UDP packets.
...
...
@@ -805,7 +805,7 @@ STATIC mp_obj_t lwip_socket_connect(mp_obj_t self_in, mp_obj_t addr_in) {
mp_raise_OSError
(
MP_EINPROGRESS
);
}
}
// Register our rec
ie
ve callback.
// Register our rec
ei
ve callback.
tcp_recv
(
socket
->
pcb
.
tcp
,
_lwip_tcp_recv
);
socket
->
state
=
STATE_CONNECTING
;
err
=
tcp_connect
(
socket
->
pcb
.
tcp
,
&
dest
,
port
,
_lwip_tcp_connected
);
...
...
extmod/modwebsocket.c
浏览文件 @
ca16c382
...
...
@@ -132,7 +132,7 @@ STATIC mp_uint_t websocket_read(mp_obj_t self_in, void *buf, mp_uint_t size, int
self
->
buf_pos
=
0
;
self
->
to_recv
=
to_recv
;
self
->
msg_sz
=
sz
;
// May be overriden by FRAME_OPT
self
->
msg_sz
=
sz
;
// May be overrid
d
en by FRAME_OPT
if
(
to_recv
!=
0
)
{
self
->
state
=
FRAME_OPT
;
}
else
{
...
...
lib/timeutils/timeutils.c
浏览文件 @
ca16c382
...
...
@@ -165,7 +165,7 @@ mp_uint_t timeutils_mktime(mp_uint_t year, mp_int_t month, mp_int_t mday,
//
// tm_tomorrow = list(time.localtime())
// tm_tomorrow[2] += 1 # Adds 1 to mday
// tomorrow = time.mktime(tm_tom
m
orrow)
// tomorrow = time.mktime(tm_tomorrow)
//
// And not have to worry about all the weird overflows.
//
...
...
lib/utils/stdout_helpers.c
浏览文件 @
ca16c382
...
...
@@ -9,7 +9,7 @@
* implementation below can be used.
*/
// Send "cooked" string of given length, where every occur
a
nce of
// Send "cooked" string of given length, where every occur
re
nce of
// LF character is replaced with CR LF.
void
mp_hal_stdout_tx_strn_cooked
(
const
char
*
str
,
size_t
len
)
{
while
(
len
--
)
{
...
...
py/asmthumb.c
浏览文件 @
ca16c382
...
...
@@ -52,7 +52,7 @@ void asm_thumb_end_pass(asm_thumb_t *as) {
#if defined(MCU_SERIES_F7)
if
(
as
->
base
.
pass
==
MP_ASM_PASS_EMIT
)
{
// flush D-cache, so the code emited is stored in memory
// flush D-cache, so the code emit
t
ed is stored in memory
SCB_CleanDCache_by_Addr
((
uint32_t
*
)
as
->
base
.
code_base
,
as
->
base
.
code_size
);
// invalidate I-cache
SCB_InvalidateICache
();
...
...
py/builtinimport.c
浏览文件 @
ca16c382
...
...
@@ -271,7 +271,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
if
(
level
!=
0
)
{
// What we want to do here is to take name of current module,
// chop <level> trailing components, and concatenate with passed-in
// module name, thus resolving relative import name into absolue.
// module name, thus resolving relative import name into absolu
t
e.
// This even appears to be correct per
// http://legacy.python.org/dev/peps/pep-0328/#relative-imports-and-name
// "Relative imports use a module's __name__ attribute to determine that
...
...
@@ -441,7 +441,7 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
#if MICROPY_CPYTHON_COMPAT
// Store module as "__main__" in the dictionary of loaded modules (returned by sys.modules).
mp_obj_dict_store
(
MP_OBJ_FROM_PTR
(
&
MP_STATE_VM
(
mp_loaded_modules_dict
)),
MP_OBJ_NEW_QSTR
(
MP_QSTR___main__
),
module_obj
);
// Store real name in "__main__" attribute. Cho
o
sen semi-randonly, to reuse existing qstr's.
// Store real name in "__main__" attribute. Chosen semi-randonly, to reuse existing qstr's.
mp_obj_dict_store
(
MP_OBJ_FROM_PTR
(
o
->
globals
),
MP_OBJ_NEW_QSTR
(
MP_QSTR___main__
),
MP_OBJ_NEW_QSTR
(
mod_name
));
#endif
}
...
...
py/compile.c
浏览文件 @
ca16c382
...
...
@@ -939,7 +939,7 @@ STATIC void c_del_stmt(compiler_t *comp, mp_parse_node_t pn) {
}
}
}
else
{
// some arbitrary statment that we can't delete (eg del 1)
// some arbitrary stat
e
ment that we can't delete (eg del 1)
goto
cannot_delete
;
}
...
...
@@ -1090,7 +1090,7 @@ STATIC void compile_import_name(compiler_t *comp, mp_parse_node_struct_t *pns) {
STATIC
void
compile_import_from
(
compiler_t
*
comp
,
mp_parse_node_struct_t
*
pns
)
{
mp_parse_node_t
pn_import_source
=
pns
->
nodes
[
0
];
// extract the prece
e
ding .'s (if any) for a relative import, to compute the import level
// extract the preceding .'s (if any) for a relative import, to compute the import level
uint
import_level
=
0
;
do
{
mp_parse_node_t
pn_rel
;
...
...
py/misc.h
浏览文件 @
ca16c382
...
...
@@ -197,7 +197,7 @@ int DEBUG_printf(const char *fmt, ...);
extern
mp_uint_t
mp_verbose_flag
;
// This is useful for unicode handling. Some CPU archs has
// special instructions for efficient implentation of this
// special instructions for efficient imple
me
ntation of this
// function (e.g. CLZ on ARM).
// NOTE: this function is unused at the moment
#ifndef count_lead_ones
...
...
py/mkenv.mk
浏览文件 @
ca16c382
...
...
@@ -32,7 +32,7 @@ ifeq ($(BUILD_VERBOSE),0)
$(info
Use
make
V
=
1 or
set
BUILD_VERBOSE
in
your environment to increase build verbosity.
)
endif
# default settings; can be overriden in main Makefile
# default settings; can be overrid
d
en in main Makefile
PY_SRC
?=
$(TOP)
/py
BUILD
?=
build
...
...
py/mpconfig.h
浏览文件 @
ca16c382
...
...
@@ -32,7 +32,7 @@
// mpconfigport.h is a file containing configuration settings for a
// particular port. mpconfigport.h is actually a default name for
// such config, and it can be overriden using MP_CONFIGFILE preprocessor
// such config, and it can be overrid
d
en using MP_CONFIGFILE preprocessor
// define (you can do that by passing CFLAGS_EXTRA='-DMP_CONFIGFILE="<file.h>"'
// argument to make when using standard MicroPython makefiles).
// This is useful to have more than one config per port, for example,
...
...
py/obj.c
浏览文件 @
ca16c382
...
...
@@ -401,7 +401,7 @@ mp_obj_t mp_obj_id(mp_obj_t o_in) {
return
MP_OBJ_NEW_SMALL_INT
(
id
);
}
else
{
// If that didn't work, well, let's return long int, just as
// a (big) positve value, so it will never clash with the range
// a (big) posit
i
ve value, so it will never clash with the range
// of small int returned in previous case.
return
mp_obj_new_int_from_uint
((
mp_uint_t
)
id
);
}
...
...
py/objstr.c
浏览文件 @
ca16c382
...
...
@@ -798,7 +798,7 @@ STATIC mp_obj_t str_uni_strip(int type, size_t n_args, const mp_obj_t *args) {
}
assert
(
last_good_char_pos
>=
first_good_char_pos
);
//+1 to accomodate the last character
//+1 to accom
m
odate the last character
size_t
stripped_len
=
last_good_char_pos
-
first_good_char_pos
+
1
;
if
(
stripped_len
==
orig_str_len
)
{
// If nothing was stripped, don't bother to dup original string
...
...
@@ -1811,7 +1811,7 @@ STATIC mp_obj_t str_islower(mp_obj_t self_in) {
}
#if MICROPY_CPYTHON_COMPAT
// These methods are superfluous in the presen
s
e of str() and bytes()
// These methods are superfluous in the presen
c
e of str() and bytes()
// constructors.
// TODO: should accept kwargs too
STATIC
mp_obj_t
bytes_decode
(
size_t
n_args
,
const
mp_obj_t
*
args
)
{
...
...
py/py.mk
浏览文件 @
ca16c382
...
...
@@ -25,7 +25,7 @@ ifeq ($(MICROPY_SSL_AXTLS),1)
CFLAGS_MOD
+=
-DMICROPY_SSL_AXTLS
=
1
-I
../lib/axtls/ssl
-I
../lib/axtls/crypto
-I
../lib/axtls/config
LDFLAGS_MOD
+=
-Lbuild
-laxtls
else
ifeq
($(MICROPY_SSL_MBEDTLS),1)
# Can be overriden by ports which have "builtin" mbedTLS
# Can be overrid
d
en by ports which have "builtin" mbedTLS
MICROPY_SSL_MBEDTLS_INCLUDE
?=
../lib/mbedtls/include
CFLAGS_MOD
+=
-DMICROPY_SSL_MBEDTLS
=
1
-I
$(MICROPY_SSL_MBEDTLS_INCLUDE)
LDFLAGS_MOD
+=
-L
../lib/mbedtls/library
-lmbedx509
-lmbedtls
-lmbedcrypto
...
...
py/ringbuf.h
浏览文件 @
ca16c382
...
...
@@ -33,7 +33,7 @@ typedef struct _ringbuf_t {
uint16_t
iput
;
}
ringbuf_t
;
// Static initalization:
// Static init
i
alization:
// byte buf_array[N];
// ringbuf_t buf = {buf_array, sizeof(buf_array)};
...
...
py/stream.c
浏览文件 @
ca16c382
...
...
@@ -51,7 +51,7 @@ STATIC mp_obj_t stream_readall(mp_obj_t self_in);
#define STREAM_CONTENT_TYPE(stream) (((stream)->is_text) ? &mp_type_str : &mp_type_bytes)
// Returns error condition in *errcode, if non-zero, return value is number of bytes written
// before error condition occured. If *errcode == 0, returns total bytes written (which will
// before error condition occur
r
ed. If *errcode == 0, returns total bytes written (which will
// be equal to input size).
mp_uint_t
mp_stream_rw
(
mp_obj_t
stream
,
void
*
buf_
,
mp_uint_t
size
,
int
*
errcode
,
byte
flags
)
{
byte
*
buf
=
buf_
;
...
...
py/vm.c
浏览文件 @
ca16c382
...
...
@@ -947,7 +947,7 @@ unwind_jump:;
DECODE_UINT
;
// unum & 0xff == n_positional
// (unum >> 8) & 0xff == n_keyword
// We have folowing stack layout here:
// We have fol
l
owing stack layout here:
// fun arg0 arg1 ... kw0 val0 kw1 val1 ... seq dict <- TOS
sp
-=
(
unum
&
0xff
)
+
((
unum
>>
7
)
&
0x1fe
)
+
2
;
#if MICROPY_STACKLESS
...
...
@@ -1018,7 +1018,7 @@ unwind_jump:;
DECODE_UINT
;
// unum & 0xff == n_positional
// (unum >> 8) & 0xff == n_keyword
// We have folowing stack layout here:
// We have fol
l
owing stack layout here:
// fun self arg0 arg1 ... kw0 val0 kw1 val1 ... seq dict <- TOS
sp
-=
(
unum
&
0xff
)
+
((
unum
>>
7
)
&
0x1fe
)
+
3
;
#if MICROPY_STACKLESS
...
...
qemu-arm/README.md
浏览文件 @
ca16c382
...
...
@@ -4,7 +4,7 @@ provided by QEMU (http://qemu.org).
The purposes of this port are to enable:
1.
Continuous integration
-
run tests agains architecture-specific parts of code base
-
run tests agains
t
architecture-specific parts of code base
2.
Experimentation
-
simulation & prototyping of anything that has architecture-specific
code
...
...
tests/basics/namedtuple1.py
浏览文件 @
ca16c382
...
...
@@ -76,7 +76,7 @@ T4 = namedtuple("TupTuple", ("foo", "bar"))
t
=
T4
(
1
,
2
)
print
(
t
.
foo
,
t
.
bar
)
# Try single string with comma field sep
e
rator
# Try single string with comma field sep
a
rator
# Not implemented so far
#T2 = namedtuple("TupComma", "foo,bar")
#t = T2(1, 2)
tests/basics/try_reraise2.py
浏览文件 @
ca16c382
# Reraise not the latest occured exception
# Reraise not the latest occur
r
ed exception
def
f
():
try
:
raise
ValueError
(
"val"
,
3
)
...
...
tests/pyb/can.py
浏览文件 @
ca16c382
...
...
@@ -158,7 +158,7 @@ print(can.recv(1))
del
can
# Testing asyncronous send
# Testing async
h
ronous send
can
=
CAN
(
1
,
CAN
.
LOOPBACK
)
can
.
setfilter
(
0
,
CAN
.
MASK16
,
0
,
(
0
,
0
,
0
,
0
))
...
...
tests/thread/stress_aes.py
浏览文件 @
ca16c382
...
...
@@ -8,7 +8,7 @@
#
# The AES code comes first (code originates from a C version authored by D.P.George)
# and then the test harness at the bottom. It can be tuned to be more/less
# agressive by changing the amount of data to encrypt, the number of loops and
# ag
g
ressive by changing the amount of data to encrypt, the number of loops and
# the number of threads.
#
# MIT license; Copyright (c) 2016 Damien P. George on behalf of Pycom Ltd
...
...
tests/wipy/uart.py
浏览文件 @
ca16c382
...
...
@@ -95,7 +95,7 @@ print(uart1.read() == None)
print
(
uart1
.
write
(
b
'123'
)
==
3
)
print
(
uart0
.
read
()
==
b
'123'
)
# no pin assign
em
nt
# no pin assign
me
nt
uart0
=
UART
(
0
,
1000000
,
pins
=
(
None
,
None
))
print
(
uart0
.
write
(
b
'123456789'
)
==
9
)
print
(
uart1
.
read
()
==
None
)
...
...
tools/insert-usb-ids.py
浏览文件 @
ca16c382
# Reads the USB VID and PID from the file specif
ed by sys.arg
[1] and then
# Reads the USB VID and PID from the file specif
ied by sys.argv
[1] and then
# inserts those values into the template file specified by sys.argv[2],
# printing the result to stdout
...
...
tools/pyboard.py
浏览文件 @
ca16c382
...
...
@@ -69,7 +69,7 @@ class TelnetToSerial:
self
.
tn
.
write
(
bytes
(
password
,
'ascii'
)
+
b
"
\r\n
"
)
if
b
'for more information.'
in
self
.
tn
.
read_until
(
b
'Type "help()" for more information.'
,
timeout
=
read_timeout
):
# login succesful
# login succes
s
ful
from
collections
import
deque
self
.
fifo
=
deque
()
return
...
...
unix/Makefile
浏览文件 @
ca16c382
...
...
@@ -262,7 +262,7 @@ coverage_test: coverage
gcov
-o
build-coverage/extmod ../extmod/
*
.c
# Value of configure's --host= option (required for cross-compilation).
# Deduce it from CROSS_COMPILE by default, but can be overriden.
# Deduce it from CROSS_COMPILE by default, but can be overrid
d
en.
ifneq
($(CROSS_COMPILE),)
CROSS_COMPILE_HOST
=
--host
=
$(
patsubst
%-,%,
$(CROSS_COMPILE)
)
else
...
...
unix/modsocket.c
浏览文件 @
ca16c382
...
...
@@ -58,7 +58,7 @@
from socket_more_funcs2 import *
-------------------
I.e. this module should stay lean, and more functions (if needed)
should be add to sep
e
rate modules (C or Python level).
should be add to sep
a
rate modules (C or Python level).
*/
#define MICROPY_SOCKET_EXTRA (0)
...
...
windows/windows_mphal.c
浏览文件 @
ca16c382
...
...
@@ -72,7 +72,7 @@ void mp_hal_stdio_mode_orig(void) {
// Previous versions of the mp_hal code would install a handler whenever Ctrl-C input is
// allowed and remove the handler again when it is not. That is not necessary though (1),
// and it might introduce problems (2) because console notifications are delivered to the
// application in a sep
erate thread.
// application in a sep
arate thread.
// (1) mp_hal_set_interrupt_char effectively enables/disables processing of Ctrl-C via the
// ENABLE_PROCESSED_INPUT flag so in raw mode console_sighandler won't be called.
// (2) if mp_hal_set_interrupt_char would remove the handler while Ctrl-C was issued earlier,
...
...
zephyr/modutime.c
浏览文件 @
ca16c382
...
...
@@ -36,7 +36,7 @@
#include "extmod/utime_mphal.h"
STATIC
mp_obj_t
mod_time_time
(
void
)
{
/* The absen
s
e of FP support is deliberate. The Zephyr port uses
/* The absen
c
e of FP support is deliberate. The Zephyr port uses
* single precision floats so the fraction component will start to
* lose precision on devices with a long uptime.
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录