| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Function to actually spool output terminal data to dupterm object.
|
|
That's just function which sets/gets dup terminal object, and can be
easily reused across ports.
|
|
|
|
|
|
|
|
Any fields changed by asynchronous callbacks must be volatile.
|
|
Polling once in 100ms means dismal performance.
TODO: Propagate this pattern to other polling places.
|
|
This is extension to CPython, it allows to easily produce human-readable
hex dump:
>>> ubinascii.hexlify(b"\xaa\x55\xaa\x55", b" ")
b'aa 55 aa 55'
|
|
Everyone loves to names similar things the same, then there're conflicts
between different libraries. The namespace prefix used is "CRYAL_", which
is weird, and that's good, as that minimizes chance of another conflict.
|
|
This basically introduces the MICROPY_MACHINE_MEM_GET_READ_ADDR
and MICROPY_MACHINE_MEM_GET_WRITE_ADDR macros. If one of them is
not defined, then a default identity function is provided.
|
|
This leaves behind the common functionality in extmod/machine_mem.c
which can be used by all ports.
|
|
Previously, sizeof() blindly assumed LAYOUT_NATIVE and tried to align
size even for packed LAYOUT_LITTLE_ENDIAN & LAYOUT_BIG_ENDIAN. As sizeof()
is implemented on a strucuture descriptor dictionary (not an structure
object), resolving this required passing layout type around.
|
|
|
|
This allows the mp_obj_t type to be configured to something other than a
pointer-sized primitive type.
This patch also includes additional changes to allow the code to compile
when sizeof(mp_uint_t) != sizeof(void*), such as using size_t instead of
mp_uint_t, and various casts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Contains implementation of ?: (non-capturing groups), ?? (non-greedy ?),
as well as much improved robustness, and edge cases and error handling by
Amir Plivatsky (@ampli).
|
|
Otherwise for code like:
while (socket->incoming == NULL) {
LWIP_DELAY(100);
}
a compiler may cache it in a register and it will be an infinite loop.
|
|
Since we now have it.
|
|
These MPHAL functions are intended to replace previously used HAL_Delay(),
HAL_GetTick() to provide better naming and MPHAL separation (they are
fully equivalent otherwise).
Also, refactor extmod/modlwip to use them.
|
|
Like foo.bar or foo->bar.
|
|
|
|
With MicroPython codestyle, with pointer casts, "*" packs with primary type
without space. Few other similar changes too (git diff -b -w is null).
|
|
Based on the original patch by Galen Hazelwood:
https://github.com/micropython/micropython/pull/1517 .
|
|
This is required to write structures to files, pass to FFI functions,
etc.
|
|
|
|
|
|
|
|
|
|
This requires root access. And on recent Linux kernels, with
CONFIG_STRICT_DEVMEM option enabled, only address ranges listed in
/proc/iomem can be accessed. The above compiled-time option can be
however overriden with boot-time option "iomem=relaxed".
This also removed separate read/write paths - there unlikely would
be a case when they're different.
|
|
Drops Thumb2 arch size by 24 bytes.
|
|
|
|
|
|
|
|
Now address comes first, and args related to struct type are groupped next.
Besides clear groupping, should help catch errors eagerly (e.g. forgetting
to pass address will error out).
Also, improve args number checking/reporting overall.
|
|
|
|
Effect can be easily achieved by ubinsacii.hexlify(hash.digest()).
|
|
|
|
This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
|
|
mp_obj_get_int_truncated will raise a TypeError if the argument is not
an integral type. Use mp_obj_int_get_truncated only when you know the
argument is a small or big int.
|
|
Refactored from "stm" module, provides mem8, mem16, mem32 objects with
array subscript syntax.
|
|
Previous to this patch the printing mechanism was a bit of a tangled
mess. This patch attempts to consolidate printing into one interface.
All (non-debug) printing now uses the mp_print* family of functions,
mainly mp_printf. All these functions take an mp_print_t structure as
their first argument, and this structure defines the printing backend
through the "print_strn" function of said structure.
Printing from the uPy core can reach the platform-defined print code via
two paths: either through mp_sys_stdout_obj (defined pert port) in
conjunction with mp_stream_write; or through the mp_plat_print structure
which uses the MP_PLAT_PRINT_STRN macro to define how string are printed
on the platform. The former is only used when MICROPY_PY_IO is defined.
With this new scheme printing is generally more efficient (less layers
to go through, less arguments to pass), and, given an mp_print_t*
structure, one can call mp_print_str for efficiency instead of
mp_printf("%s", ...). Code size is also reduced by around 200 bytes on
Thumb2 archs.
|