aboutsummaryrefslogtreecommitdiff
path: root/extmod
AgeCommit message (Collapse)Author
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
2015-01-28moduzlib: Implement raw DEFLATE decoding support.Paul Sokolovsky
2015-01-26moduzlib: Update to uzlib v1.2.Paul Sokolovsky
Actually manage size of the output buffer.
2015-01-23modujson: .loads(): Handle more whitespace characters.Paul Sokolovsky
2015-01-21py: Remove mp_obj_str_builder and use vstr instead.Damien George
With this patch str/bytes construction is streamlined. Always use a vstr to build a str/bytes object. If the size is known beforehand then use vstr_init_len to allocate only required memory. Otherwise use vstr_init and the vstr will grow as needed. Then use mp_obj_new_str_from_vstr to create a str/bytes object using the vstr memory. Saves code ROM: 68 bytes on stmhal, 108 bytes on bare-arm, and 336 bytes on unix x64.
2015-01-20py, unix: Allow to compile with -Wunused-parameter.Damien George
See issue #699.
2015-01-12py, unix, lib: Allow to compile with -Wold-style-definition.Damien George
2015-01-01extmod: Prefix py/ for includes from py core directory.Damien George
2014-12-10py: Make functions static where appropriate.Damien George
2014-12-05py: Rename mp_obj_int_get to mp_obj_int_get_truncated; fix struct.pack.Damien George
mp_obj_int_get_truncated is used as a "fast path" int accessor that doesn't check for overflow and returns the int truncated to the machine word size, ie mp_int_t. Use mp_obj_int_get_truncated to fix struct.pack when packing maximum word sized values. Addresses issues #779 and #998.
2014-11-29Use MP_DEFINE_CONST_DICT macro to define module dicts.Damien George
This is just a clean-up of the code. Generated code is exactly the same.
2014-11-29modubinascii: Add, with hexlify() implementation.Paul Sokolovsky
2014-11-22moduhashlib: Integrate sha256 implementation.Paul Sokolovsky
2014-11-22moduhashlib: Add sha256 implementation from "crypto-algorithms" project.Paul Sokolovsky
https://github.com/B-Con/crypto-algorithms revision 100f4ff
2014-11-22moduhashlib: Initial module skeleton.Paul Sokolovsky
2014-11-21windows: Update config with latest featuresstijn
- update mpconfigport.h to reflect latest unix version - fix compilation error in modure due to msvc not allowing dynamic arrays
2014-10-30moductypes: Make .sizeof() work with bytearrays.Paul Sokolovsky
2014-10-30moductypes: When dereferencing a field which is array of uint8, use bytearray.Paul Sokolovsky
Because bytearrays are much friendlier to work with, e.g. they can be printed easily.