aboutsummaryrefslogtreecommitdiff
path: root/extmod
AgeCommit message (Collapse)Author
2015-12-04extmod/moductypes: set_aligned(): Handle INT64/UINT64.Paul Sokolovsky
2015-11-29py: Wrap all obj-ptr conversions in MP_OBJ_TO_PTR/MP_OBJ_FROM_PTR.Damien George
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-29py: Add MP_ROM_* macros and mp_rom_* types and use them.Damien George
2015-11-29extmod/modmachine: Use uintptr_t instead of mp_uint_t for address type.Damien George
2015-11-25extmod/fsusermount: Make configurable with MICROPY_FSUSERMOUNT.Paul Sokolovsky
2015-11-25extmod: Move fsusermount.c from stmhal for cross-port reuse.Paul Sokolovsky
2015-11-23extmod/modure: Use correct integer type for n_args argument.Damien George
2015-11-04extmod/lwip: Change void pointers to unions, include new mphal.h fileGalen Hazelwood
2015-11-01extmod/re1.5: Workaround issue with mingw32-gcc 4.2.1.Paul Sokolovsky
2015-11-01extmod/modure: Make sure that errors in regexps are caught early.Paul Sokolovsky
2015-11-01extmod/re1.5: Update to 0.8.Paul Sokolovsky
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-10-31extmod/modlwip: socket->incoming changed by async callbacks, must be volatile.Paul Sokolovsky
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-28extmod/moductypes: When dealing with UINT64, use mp_obj_new_int_from_ull().Paul Sokolovsky
Since we now have it.
2015-10-27unix, stmhal: Introduce mp_hal_delay_ms(), mp_hal_ticks_ms().Paul Sokolovsky
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-27extmod/modlwip: Codestyle: no need for () when taking address of primary expr.Paul Sokolovsky
Like foo.bar or foo->bar.
2015-10-27extmod/modlwip: lwip_tcp_send(): Common subexpression elimination, use MIN().Paul Sokolovsky
2015-10-27extmod/modlwip.c: Codestyle whitespace changes.Paul Sokolovsky
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-27extmod/modlwip: slip: Use stream protocol and be port-independent.Paul Sokolovsky
Based on the original patch by Galen Hazelwood: https://github.com/micropython/micropython/pull/1517 .
2015-10-26extmod/moductypes: Implement buffer protocol.Paul Sokolovsky
This is required to write structures to files, pass to FFI functions, etc.
2015-10-23extmod/modlwip: Initial commit of the lwip network stack moduleGalen Hazelwood
2015-10-20extmod/modussl: Remove unused header.Paul Sokolovsky
2015-10-06modussl: SSL socket wrapper module based on axTLS.Paul Sokolovsky
2015-08-18extmod/modmachine: Avoid conflicts with system PAGE_SIZE define, if any.Paul Sokolovsky
2015-07-08modmachine: Implement physical memory access using /dev/mem (Linux, etc).Paul Sokolovsky
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.
2015-07-06extmod/modubinascii: Re-use error string to reduce code size.Damien George
Drops Thumb2 arch size by 24 bytes.
2015-07-04ubinascii: Fix a shadowed variable case.Paul Sokolovsky
2015-07-04ubinascii: b2a_base64: Optimize away a modulo operation.Paul Sokolovsky
2015-07-04extmod: Add a2b_base64 and b2a_base64 functions to ubinascii.Galen Hazelwood
2015-06-06moductypes: Swap address and descriptor args in constructor.Paul Sokolovsky
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.
2015-05-22extmod: Actually expose the ubinascii python methods.Daniel Campora
2015-05-21moduhashlib: Remove not implemented .hexdigest().Paul Sokolovsky
Effect can be easily achieved by ubinsacii.hexlify(hash.digest()).
2015-05-21extmod: Expose mod_binascii_hexlify() and mod_binascii_unhexlify().Daniel Campora
2015-05-20extmod: Add ubinascii.unhexlifyDave Hylands
This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
2015-05-12py: Add mp_obj_get_int_truncated and use it where appropriate.Damien George
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.
2015-05-04modmachine: Add new module to access hardware, starting with physical memory.Paul Sokolovsky
Refactored from "stm" module, provides mem8, mem16, mem32 objects with array subscript syntax.
2015-04-16py: Overhaul and simplify printf/pfenv mechanism.Damien George
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.
2015-04-11py: Combine load_attr and store_attr type methods into one (attr).Damien George
This simplifies the API for objects and reduces code size (by around 400 bytes on Thumb2, and around 2k on x86). Performance impact was measured with Pystone score, but change was barely noticeable.
2015-03-19extmod/crypto: Add static keyword where it should be.Damien George
2015-03-19extmod: Update uzlib to 1.2.1.Paul Sokolovsky
Fixes for compiler warnings in pedantic mode.
2015-03-18extmod: Update re1.5 to 0.7.Paul Sokolovsky
Includes static function fix and all the previous improvements and fixes by @dpgeorge.
2015-03-17extmod/ure: Fix msvc warning resulting from memset on const char ** pointerstijn
2015-03-14py, extmod: Remove include of unnecessary system headers.Damien George
2015-03-10extmod: Pull in upstream changes to re1.5; fixes bugs with regex errors.Damien George
2015-03-04extmod/ure: Correctly return None when a group has no match.Damien George
See issue #1122.
2015-02-21extmod: Pull in upstream changes to re1.5; fixes bug, adds named class.Damien George
2015-02-18extmod/modure: Make num_matches store actual number of matches.Damien George
2015-02-08py: Parse big-int/float/imag constants directly in parser.Damien George
Previous to this patch, a big-int, float or imag constant was interned (made into a qstr) and then parsed at runtime to create an object each time it was needed. This is wasteful in RAM and not efficient. Now, these constants are parsed straight away in the parser and turned into objects. This allows constants with large numbers of digits (so addresses issue #1103) and takes us a step closer to #722.
2015-02-02extmod: Make ujson.loads raise exception if given empty string.Damien George
Addresses issue #1097.
2015-01-28py: Change vstr so that it doesn't null terminate buffer by default.Damien George
This cleans up vstr so that it's a pure "variable buffer", and the user can decide whether they need to add a terminating null byte. In most places where vstr is used, the vstr did not need to be null terminated and so this patch saves code size, a tiny bit of RAM, and makes vstr usage more efficient. When null termination is needed it must be done explicitly using vstr_null_terminate.
2015-01-28moduzlib: Align out buffer to block size; shrink when decompression done.Paul Sokolovsky