Damien George
3022e00bbf
lib/netutils: Update for changes to mp_obj_str_get_data.
2017-03-29 12:56:45 +11:00
Damien George
fb161aa45a
lib/libm: Add implementation of nearbyintf, from musl-1.1.16.
2017-03-24 10:38:11 +11:00
Damien George
6e74d24f30
py: Add micropython.schedule() function and associated runtime code.
2017-03-20 15:20:26 +11:00
Damien George
3f7aa330fd
lib/utils/pyexec: Fix bug with pyexec_file not setting flag for source.
2017-03-14 21:53:46 +11:00
Damien George
41b1df6046
lib/memzip: Make lexer constructor raise exception when file not found.
2017-03-14 11:52:05 +11:00
Damien George
56b238393b
lib/utils/pyexec: Refactor to put lexer constructors all in one place.
...
The lexer can now raise an exception on construction so it must go within
an nlr handler block.
2017-03-14 11:52:05 +11:00
Damien George
3b2fd4df31
lib/utils/pyexec: Allow to compile when the uPy compiler is disabled.
2017-02-27 15:02:32 +11:00
Andrew Gatt
9d3c0d423e
lib/oofatfs/ffconf.h: Add MICROPY_FATFS_NORTC option.
2017-01-31 19:54:20 +11:00
Damien George
b039d93d7e
lib/oofatfs/ffconf.h: Allow to configure FS_EXFAT option.
...
Using MICROPY_FATFS_EXFAT. Enabling this has licensing implications;
see https://www.microsoft.com/en-us/legal/intellectualproperty/mtl/exfat-licensing.aspx
2017-01-31 12:32:24 +11:00
Damien George
9425bf5b2b
lib/fatfs: Remove old fatfs library component, it's replaced by oofatfs.
2017-01-30 12:26:08 +11:00
Damien George
28899cd971
lib/oofatfs: Update oofatfs library.
...
From https://github.com/micropython/oofatfs , branch work-R0.12b,
commit 46fb53331e7a583c29a41d37ce4b53f2718597e5.
2017-01-30 12:07:40 +11:00
Damien George
0390bc97ea
lib/oofatfs: Update oofatfs library.
...
From https://github.com/micropython/oofatfs , branch work-R0.12b,
commit 1e295b40550664bbaac18d95a4b6a58154464d31.
2017-01-27 23:22:15 +11:00
Damien George
9b08faf3ae
lib/oofatfs: Add OO version of FatFS library.
...
From https://github.com/micropython/oofatfs , branch work-R0.12b,
commit a346ccec123c2e4d887e2751d64156208d03bff4.
2017-01-27 13:19:10 +11:00
Damien George
211244d1f3
lib/utils/pyexec: Only print help prompt if HELP feature is enabled.
2017-01-22 12:33:19 +11:00
Damien George
895807137e
lib/utils: Remove old pyhelp helper, replaced with py/builtinhelp.c.
...
Ports should no longer use pyhelp_print_obj but instead should define
MICROPY_PY_BUILTINS_HELP to 1 and then specify their help text using
MICROPY_PY_BUILTINS_HELP_TEXT.
2017-01-22 11:56:16 +11:00
Damien George
d89cafd5c3
lib/utils/interrupt_char: Use core-provided mp_kbd_exception if enabled.
...
Ultimately all ports that use lib/utils/interrupt_char would enable
MICROPY_KBD_EXCEPTION, so this is an interim solution.
2016-12-15 13:35:54 +11:00
Damien George
cd527bb324
lib/libm: Move Thumb-specific sqrtf function to separate file.
...
This allows it to be used only when the hardware supports VFP
instructions, preventing compile errors.
2016-11-03 12:26:32 +11:00
Paul Sokolovsky
3cdccb9b14
zephyr: Fix mp_hal_set_interrupt_char() declaration to be compatible.
...
With other ports. Other ports declare it in mphalport.h, it can be
inline or macro.
2016-10-26 17:53:28 +03:00
Paul Sokolovsky
6832cbd69d
lib/utils/pyexec: Fix compilation warning of type vs format mismatch.
...
This happens with some compilers on some architectures, which don't define
size_t as unsigned int. MicroPython's printf() dooesn't support obscure
format specifiers for size_t, so the obvious choice is to explicitly cast
to unsigned, to match %u used in printf().
2016-10-26 13:45:03 +03:00
Vincenzo Frascino
c38ea32810
lib/utils/pyexec: Add mp_hal_set_interrupt_char() prototype.
...
This patch removes a compilation warning in pyexec.
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org >
2016-10-26 13:42:27 +03:00
Erik Moqvist
f64e806f50
lib/utils/pyhelp.c: Use mp_printf() instead of printf()
...
This patch introduces MP_PYTHON_PRINTER for general use.
2016-10-21 18:30:58 +11:00
Damien George
4ebdb1f2b2
py: Be more specific with MP_DECLARE_CONST_FUN_OBJ macros.
...
In order to have more fine-grained control over how builtin functions are
constructed, the MP_DECLARE_CONST_FUN_OBJ macros are made more specific,
with suffix of _0, _1, _2, _3, _VAR, _VAR_BETEEN or _KW. These names now
match the MP_DEFINE_CONST_FUN_OBJ macros.
2016-10-21 16:26:01 +11:00
Damien George
ad3724e0bc
lib/utils/pyexec: Allow behaviour of SystemExit to be configurable.
...
Setting the pyexec_system_exit variable to PYEXEC_FORCED_EXT allows
SystemExit exceptions to terminate the pyexec functions.
2016-10-17 13:14:59 +11:00
Damien George
824f5c5a32
py/vstr: Combine vstr_new_size with vstr_new since they are rarely used.
...
Now there is just one function to allocate a new vstr, namely vstr_new
(in addition to vstr_init etc). The caller of this function should know
what initial size to allocate for the buffer, or at least have some policy
or config option, instead of leaving it to a default (as it was before).
2016-10-14 16:46:34 +11:00
Paul Sokolovsky
4021b1e1b8
lib/utils/pyexec: Don't treat SystemExit as "forced exit".
...
"Forced exit" is treated as soft-reboot (Ctrl+D). But expected effect of
calling sys.exit() is termination of the current script, not any further
and more serious actions like mentioned soft reboot.
2016-10-12 18:00:32 +03:00