Dave Hylands
755b01439b
unix: machine_mem improvements
...
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.
2015-12-18 22:01:03 +02:00
Dave Hylands
f925165942
unix: Move modmachine into unix directory
...
This leaves behind the common functionality in extmod/machine_mem.c
which can be used by all ports.
2015-12-13 01:21:36 +02:00
Paul Sokolovsky
d4a874b81e
extmod/moductypes: sizeof operation depends on layout type of structure.
...
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.
2015-12-09 21:43:28 +02:00
Paul Sokolovsky
add6f4556e
extmod/moductypes: set_aligned(): Handle INT64/UINT64.
2015-12-04 00:59:08 +02:00
Damien George
999cedb90f
py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.
...
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.
2015-11-29 14:25:35 +00:00
Damien George
cbf7674025
py: Add MP_ROM_* macros and mp_rom_* types and use them.
2015-11-29 14:25:04 +00:00
Damien George
278f3592d4
extmod/modmachine: Use uintptr_t instead of mp_uint_t for address type.
2015-11-29 14:25:04 +00:00
Paul Sokolovsky
f0fbab7ca7
extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.
2015-11-25 13:19:36 +02:00
Paul Sokolovsky
3a1bbcc2ef
extmod: Move fsusermount.c from stmhal for cross-port reuse.
2015-11-25 13:19:36 +02:00
Damien George
a8aa1998ce
extmod/modure: Use correct integer type for n_args argument.
2015-11-23 15:05:58 +00:00
Galen Hazelwood
af3e45419c
extmod/lwip: Change void pointers to unions, include new mphal.h file
2015-11-04 23:24:04 +03:00
Paul Sokolovsky
d0601b0a1f
extmod/re1.5: Workaround issue with mingw32-gcc 4.2.1.
2015-11-01 02:39:01 +03:00
Paul Sokolovsky
aee704ebe1
extmod/modure: Make sure that errors in regexps are caught early.
2015-11-01 00:38:22 +03:00
Paul Sokolovsky
7cce2f664c
extmod/re1.5: Update to 0.8.
...
Contains implementation of ?: (non-capturing groups), ?? (non-greedy ?),
as well as much improved robustness, and edge cases and error handling by
Amir Plivatsky (@ampli).
2015-11-01 00:38:00 +03:00
Paul Sokolovsky
4deb4936d5
extmod/modlwip: socket->incoming changed by async callbacks, must be volatile.
...
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.
2015-10-31 19:51:23 +03:00
Paul Sokolovsky
20f85feecc
extmod/moductypes: When dealing with UINT64, use mp_obj_new_int_from_ull().
...
Since we now have it.
2015-10-28 00:21:42 +03:00
Paul Sokolovsky
404dae80a9
unix, stmhal: Introduce mp_hal_delay_ms(), mp_hal_ticks_ms().
...
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.
2015-10-27 23:31:42 +03:00
Paul Sokolovsky
858ed6d2f7
extmod/modlwip: Codestyle: no need for () when taking address of primary expr.
...
Like foo.bar or foo->bar.
2015-10-27 01:39:57 +03:00
Paul Sokolovsky
fa87e90cfa
extmod/modlwip: lwip_tcp_send(): Common subexpression elimination, use MIN().
2015-10-27 01:39:57 +03:00
Paul Sokolovsky
76217064ac
extmod/modlwip.c: Codestyle whitespace changes.
...
With MicroPython codestyle, with pointer casts, "*" packs with primary type
without space. Few other similar changes too (git diff -b -w is null).
2015-10-27 01:39:57 +03:00
Paul Sokolovsky
e0d7740a22
extmod/modlwip: slip: Use stream protocol and be port-independent.
...
Based on the original patch by Galen Hazelwood:
https://github.com/micropython/micropython/pull/1517 .
2015-10-27 00:04:59 +03:00
Paul Sokolovsky
393d0c1679
extmod/moductypes: Implement buffer protocol.
...
This is required to write structures to files, pass to FFI functions,
etc.
2015-10-26 01:03:24 +03:00
Galen Hazelwood
805c6534f8
extmod/modlwip: Initial commit of the lwip network stack module
2015-10-23 19:30:02 +03:00
Paul Sokolovsky
d19e4f0ba4
extmod/modussl: Remove unused header.
2015-10-20 17:41:59 +03:00
Paul Sokolovsky
aaa8867d4a
modussl: SSL socket wrapper module based on axTLS.
2015-10-06 18:10:39 +03:00