summaryrefslogtreecommitdiffstatshomepage
path: root/py/qstrdefs.h
Commit message (Collapse)AuthorAge
* py: Add rules for automated extraction of qstrs from sources.Jan Čapek2016-04-16
| | | | | | | | | | | | | | | | | | | | | - add template rule that converts a specified source file into a qstring file - add special rule for generating a central header that contains all extracted/autogenerated strings - defined by QSTR_DEFS_COLLECTED variable. Each platform appends a list of sources that may contain qstrings into a new build variable: SRC_QSTR. Any autogenerated prerequisities are should be appened to SRC_QSTR_AUTO_DEPS variable. - remove most qstrings from py/qstrdefs, keep only qstrings that contain special characters - these cannot be easily detected in the sources without additional annotations - remove most manual qstrdefs, use qstrdef autogen for: py, cc3200, stmhal, teensy, unix, windows, pic16bit: - remove all micropython generic qstrdefs except for the special strings that contain special characters (e.g. /,+,<,> etc.) - remove all port specific qstrdefs except for special strings - append sources for qstr generation in platform makefiles (SRC_QSTR)
* py: add async/await/async for/async with syntaxpohmelie2016-04-13
| | | | | | | | They are sugar for marking function as generator, "yield from" and pep492 python "semantically equivalents" respectively. @dpgeorge was the original author of this patch, but @pohmelie made changes to implement `async for` and `async with`.
* extmod/machine_i2c: Implement I2C memory reading/writing.Damien George2016-04-12
|
* extmod: Add generic machine.I2C class, with bit-bang I2C.Damien George2016-04-12
| | | | Should work on any machine that provides the correct pin functions.
* extmod: Add initial framebuf module.Damien George2016-04-12
|
* extmod/modlwip: Add SOL_SOCKET and SO_REUSEADDR constants for setsockopt().Paul Sokolovsky2016-03-25
|
* py/modio: Initial implementation of io.BufferedWriter class.Paul Sokolovsky2016-03-25
| | | | Just .write() method implemented currently.
* extmod/modwebsocket: Start module for WebSocket helper functions.Paul Sokolovsky2016-03-24
| | | | Currently, only write support is implemented (of limited buffer size).
* extmod/modlwip: Add dummy .makefile() method.Paul Sokolovsky2016-03-09
|
* extmod/modlwip: Implement dummy setsockopt().Paul Sokolovsky2016-03-08
|
* py/qstrdefs: Add mkdir and remove qstrs for user-mountable filesystems.Damien George2016-02-29
|
* extmod/vfs_fat: Add .rename() method.Paul Sokolovsky2016-02-29
|
* extmod/vfs_fat: Move listdir() method from stmhal for reuse.Paul Sokolovsky2016-02-28
|
* py/emitinlinethumb: Use qstrs instead of char* for names of asm ops.Damien George2016-02-23
| | | | | | | | Reduces code size by 112 bytes on Thumb2 arch, and makes assembler faster because comparison can be a simple equals instead of a string compare. Not all ops have been converted, only those that were simple to convert and reduced code size.
* py/qstrdefs.h: qstrs for VfsFat.Paul Sokolovsky2016-02-15
|
* extmod/fsusermount: Expose umount as a public function.Damien George2016-02-10
|
* extmod/fsusermount: Change block protocol to support ioctl method.Damien George2016-02-10
| | | | | | | | | | | | | The new block protocol is: - readblocks(self, n, buf) - writeblocks(self, n, buf) - ioctl(self, cmd, arg) The new ioctl method handles the old sync and count methods, as well as a new "get sector size" method. The old protocol is still supported, and used if the device doesn't have the ioctl method.
* py/inlineasm: Add ability to specify return type of asm_thumb funcs.Damien George2016-01-27
| | | | | | | | | | Supported return types are: object, bool, int, uint. For example: @micropython.asm_thumb def foo(r0, r1) -> uint: add(r0, r0, r1)
* extmod/modurandom: Add some extra random functions.Damien George2016-01-26
| | | | | | | | | | | | | Functions added are: - randint - randrange - choice - random - uniform They are enabled with configuration variable MICROPY_PY_URANDOM_EXTRA_FUNCS, which is disabled by default. It is enabled for unix coverage build and stmhal.
* extmod/moduhashlib: Add support for SHA1 (based on axTLS).Paul Sokolovsky2016-01-24
| | | | | | | | | SHA1 is used in a number of protocols and algorithm originated 5 years ago or so, in other words, it's in "wide use", and only newer protocols use SHA2. The implementation depends on axTLS enabled. TODO: Make separate config option specifically for sha1().
* py/modmicropython: Add stack_use, heap_lock and heap_unlock functions.Damien George2016-01-24
| | | | | | | | | micropython.stack_use() returns an integer being the number of bytes used on the stack. micropython.heap_lock() and heap_unlock() can be used to prevent the memory manager from allocating anything on the heap. Calls to these are allowed to be nested.
* py: Add ustruct.pack_into and unpack_fromDave Hylands2016-01-19
|
* extmod/modurandom: Add "urandom" module.Paul Sokolovsky2016-01-17
| | | | | | | | Seedable and reproducible pseudo-random number generator. Implemented functions are getrandbits(n) (n <= 32) and seed(). The algorithm used is Yasmarang by Ilya Levin: http://www.literatecode.com/yasmarang
* builtin property: accept keyword argumentschrysn2016-01-14
| | | | | | | | | | this allows python code to use property(lambda:..., doc=...) idiom. named versions for the fget, fset and fdel arguments are left out in the interest of saving space; they are rarely used and easy to enable when actually needed. a test case is included.
* py: Implement __dict__ for instances.stijn2016-01-03
| | | | | | Note that even though wrapped in MICROPY_CPYTHON_COMPAT, it is not fully compatible because the modifications to the dictionary do not propagate to the actual instance members.
* py: Clean up instantiation of dupterm object.Paul Sokolovsky2016-01-01
| | | | To comply with already established scheme for extmod's.
* stmhal: Add struct qstr to block of qstrs needed for MICROPY_PY_STRUCT.Dave Hylands2015-12-28
| | | | Otherwise build fails if uctypes is disabled.
* extmod/fsusermount: Move module qstrs to global pool from stmhal port.Paul Sokolovsky2015-12-25
|
* ports: Rename "machine" module to "umachine".Paul Sokolovsky2015-12-18
| | | | | | | | To let unix port implement "machine" functionality on Python level, and keep consistent naming in other ports (baremetal ports will use magic module "symlinking" to still load it on "import machine"). Fixes #1701.
* py: Add min/max "default" keyword argumentpohmelie2015-12-07
|
* py: Add MICROPY_PY_BUILTINS_MIN_MAX, disable for minimal ports.pohmelie2015-12-07
|
* py/modsys: Implement sys.modules.Paul Sokolovsky2015-12-05
| | | | | This for example will allow people to reload modules which didn't load successfully (e.g. due to syntax error).
* py/modmath: Make log2, log10 and hyperbolic funcs be SPECIAL_FUNCTIONS.Damien George2015-11-17
| | | | | | Will be included only when MICROPY_PY_MATH_SPECIAL_FUNCTIONS is enabled. Also covers cmath module (but only log10 is there at the moment).
* extmod/modlwip: slip: Use stream protocol and be port-independent.Paul Sokolovsky2015-10-27
| | | | | Based on the original patch by Galen Hazelwood: https://github.com/micropython/micropython/pull/1517 .
* py: Add support for _ in REPL to hold last computed value.Damien George2015-10-17
| | | | Only available when MICROPY_CAN_OVERRIDE_BUILTINS is enabled.
* py: Implement ptr32 load and store in viper emitter.Damien George2015-10-13
|
* modussl: SSL socket wrapper module based on axTLS.Paul Sokolovsky2015-10-06
|
* py: Make "enumerate" qstr be conditional on MICROPY_PY_BUILTINS_ENUMERATE.Paul Sokolovsky2015-09-03
|
* py: Add MICROPY_PY_BUILTINS_FILTER, disable for minimal ports.Paul Sokolovsky2015-08-20
| | | | Saves 320 bytes on x86.
* py: Add stream_tell method, and use for unix and stmhal file tell.blmorris2015-08-13
|
* py: Make qstr hash size configurable, defaults to 2 bytes.Damien George2015-07-20
| | | | | | | This patch makes configurable, via MICROPY_QSTR_BYTES_IN_HASH, the number of bytes used for a qstr hash. It was originally fixed at 2 bytes, and now defaults to 2 bytes. Setting it to 1 byte will save ROM and RAM at a small expense of hash collisions.
* extmod: Add a2b_base64 and b2a_base64 functions to ubinascii.Galen Hazelwood2015-07-04
|
* py: Add TimeoutError exception subclassed from OSError.Daniel Campora2015-07-02
| | | | | | | The TimeoutError is useful for some modules, specially the the socket module. TimeoutError can then be alised to socket.timeout and then Python code can differentiate between socket.error and socket.timeout.
* stmhal: Implement sys.std{in,out,err}.buffer, for raw byte mode.Damien George2015-05-24
| | | | It's configurable and only enabled for stmhal port.
* py: Remove hexdigest QSTR since the method has been removed as well.Daniel Campora2015-05-21
|
* extmod: Add ubinascii.unhexlifyDave Hylands2015-05-20
| | | | This also pulls out hex_digit from py/lexer.c and makes unichar_hex_digit
* modbuiltins: Add NotImplemented builtin constant.Paul Sokolovsky2015-05-04
| | | | | | | | | | | | From https://docs.python.org/3/library/constants.html#NotImplemented : "Special value which should be returned by the binary special methods (e.g. __eq__(), __lt__(), __add__(), __rsub__(), etc.) to indicate that the operation is not implemented with respect to the other type; may be returned by the in-place binary special methods (e.g. __imul__(), __iand__(), etc.) for the same purpose. Its truth value is true." Some people however appear to abuse it to mean "no value" when None is a legitimate value (don't do that).
* modstruct: Rename module to "ustruct", to allow full Python-level impl.Paul Sokolovsky2015-05-04
|
* modstruct: Group module qstr's together.Paul Sokolovsky2015-05-04
|
* modmachine: Add new module to access hardware, starting with physical memory.Paul Sokolovsky2015-05-04
| | | | | Refactored from "stm" module, provides mem8, mem16, mem32 objects with array subscript syntax.