aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-22py/objtype: mp_obj_new_super doesn't need to be public, so inline it.Damien George
Saves code size (20 bytes on bare-arm) and makes it a tiny bit more efficient.
2017-04-21extmod/moductypes: Fix bigint handling for 32-bit ports.Paul Sokolovsky
2017-04-21windows: Bring mpconfigport.h up-to-date with unix portstijn
Add definitions/source files for features which work on the windows ports but weren't yet enabled. UTIME related lines are moved a couple of lines up to make comparision with unix/mpconfigport.h easier in the future.
2017-04-21py: Reduce str/repr precision of float numbers when floats are 30-bit.Damien George
With 30-bit floats there aren't enough bits to faithfully print 7 decimal digits, so reduce the precision to 6 digits.
2017-04-19zephyr/modmachine: Implement machine.reset().Paul Sokolovsky
2017-04-18stmhal/timer: Clear interrupt flag before setting callback.Henrik Sölver
Sometimes when setting a channel callback the callback fires immediately, even if the compare register is set to a value far into the future. This happens when the free running counter has previously been equal to what happens to be in the compare register. This patch make sure that there is no pending interrupt when setting a callback.
2017-04-18tests/micropython: Add test for micropython.kbd_intr().Damien George
2017-04-18py/modmicropython: Add micropython.kbd_intr() function.Damien George
It controls the character that's used to (asynchronously) raise a KeyboardInterrupt exception. Passing "-1" allows to disable the interception of the interrupt character (as long as a port allows such a behaviour).
2017-04-18docs/library/machine.SPI: Fix formatting of bullet list to stop warning.Damien George
2017-04-18docs/library/machine.I2C: Remove WiPy-specific return values.Damien George
cc3200 has been updated to conform to the API and now returns None.
2017-04-18cc3200/mods/pybi2c: Make readfnom_mem_into/writeto_mem return None.Damien George
This aligns the I2C class to match the standard machine.I2C API. Note that this is a (small) breaking change to the existing cc3200 API. The original API just returned the size of the input buffer so there's no information lost by this change. To update scripts users should just use the size of the buffer passed to these functions to get the number of bytes that are read/written.
2017-04-18docs/esp8266/quickref: Add links from quickref page to machine classes.Damien George
2017-04-18docs/library/machine.*: Add cross-reference label to individual classes.Damien George
2017-04-18docs/library/machine.I2C: Deconditionalise all methods.Damien George
The cc3200 port is now similar enough to the standard machine.I2C API so that all conditionals can be removed.
2017-04-18docs/wipy/general: Add section about specifics of I2C implementation.Damien George
2017-04-18docs/wipy/quickref: Update reference for change to I2C API.Damien George
2017-04-18cc3200/mods/pybi2c: Make machine.I2C constructor/init conform to HW API.Damien George
This is a user-facing change to the cc3200's API, to make it conform to the new machine hardware API. The changes are: - change I2C constructor to: I2C(id=0, *, freq=100000, scl=None, sda=None) - change I2C init to: init(*, freq, scl, sda) - removal of machine.I2C.MASTER constant - I2C str/repr no longer prints I2C.MASTER To update existing code it should be enough to just remove the I2C.MASTER constant from contructor/init for I2C.
2017-04-18docs/library/machine.UART: Remove pyboard-specific section.Damien George
stmhal doesn't have a machine.UART class so this section is not needed.
2017-04-18minimal/main: Make Cortex-M vector table constant.Damien George
2017-04-16tests/run-tests: Don't post-process CRASH result in any way.Paul Sokolovsky
If we got a CRASH result, return early, similar to SKIP. This is important because previous refactor changed branching logic a bit, so CRASH now gets post-processed into CRASH\n, which broke remote hardware tests.
2017-04-16docs/library/machine: Typo fix in machine_callbacks section.Paul Sokolovsky
2017-04-16docs/machine: Move machine.main() misnomer to wipy's known issues.Paul Sokolovsky
2017-04-16docs/machine.UART: Deconditionalize normal methods.Paul Sokolovsky
2017-04-16docs/library/ussl: Deconditionalize, wipy notes moved to its documentation.Paul Sokolovsky
2017-04-16docs/library/uos: urandom: Generalize description.Paul Sokolovsky
Don't give a guarantee of HW RNG, only a possibility of its usage.
2017-04-16docs/library/micropython: Deconditionalize.Paul Sokolovsky
2017-04-15extmod/machine_signal: Rename "inverted" arg to "invert", it's shorter.Damien George
A shorter name takes less code size, less room in scripts and is faster to type at the REPL. Tests and HW-API examples are updated to reflect the change.
2017-04-14socket_send: Don't send more than MTU allows.Paul Sokolovsky
As Zephyr currently doesn't handle MTU itself (ZEP-1998), limit amount of data we send on our side. Also, if we get unsuccessful result from net_nbuf_append(), calculate how much data it has added still. This works around ZEP-1984.
2017-04-14tests/run-tests: Search feature checks wrt to main script location.Paul Sokolovsky
If run-tests script is run from another dir, we still want to look up feature checks in run-tests' dir.
2017-04-14docs/esp8266/tutorial/intro: Reword section on flash size requirement.Paul Sokolovsky
Give a clearly dissuading tone on end users trying 512KB version - it has to many end-usery features lacking.
2017-04-14esp8266/README: Add notice about 512K version.Paul Sokolovsky
2017-04-14esp8266/README: Replace reference of alpha status to beta status.Paul Sokolovsky
2017-04-13zephyr/modusocket: Strip packet header right in the receive callback.Paul Sokolovsky
Instead of complicating recv() implementation.
2017-04-13tests/extmod/utimeq1: Improve coverage of utimeq module.Damien George
2017-04-12py/gc: Execute finaliser code in a protected environment.Damien George
If a finaliser raises an exception then it must not propagate through the GC sweep function. This patch protects against such a thing by running finaliser code via the mp_call_function_1_protected call. This patch also adds scheduler lock/unlock calls around the finaliser execution to further protect against any possible reentrancy issues: the memory manager is already locked when doing a collection, but we also don't want to allow any scheduled code to run, KeyboardInterrupts to interupt the code, nor threads to switch.
2017-04-12py/nlrsetjmp: Add check for failed NLR jump.Damien George
Also optimise the function so it only needs to call the MP_STATE_THREAD macro once (following how other nlr code is written).
2017-04-12unix: Enabled high-quality float hashing in coverage build.Damien George
2017-04-12py/objfloat: Add implementation of high-quality float hashing.Damien George
Disabled by default.
2017-04-12py: Optimise types for common case where type has a single parent type.Damien George
The common cases for inheritance are 0 or 1 parent types, for both built-in types (eg built-in exceptions) as well as user defined types. So it makes sense to optimise the case of 1 parent type by storing just the type and not a tuple of 1 value (that value being the single parent type). This patch makes such an optimisation. Even though there is a bit more code to handle the two cases (either a single type or a tuple with 2 or more values) it helps reduce overall code size because it eliminates the need to create a static tuple to hold single parents (eg for the built-in exceptions). It also helps reduce RAM usage for user defined types that only derive from a single parent. Changes in code size (in bytes) due to this patch: bare-arm: -16 minimal (x86): -176 unix (x86-64): -320 unix nanbox: -384 stmhal: -64 cc3200: -32 esp8266: -108
2017-04-12py/obj: Clean up and add comments describing mp_obj_type_t struct.Damien George
2017-04-11zephyr/modusocket: Call net_nbuf_print_frags() in recv callback if DEBUG > 1.Paul Sokolovsky
2017-04-11py/objint: Use unsigned arithmetic when formatting an integer.Damien George
Otherwise the edge case of the most negative integer value will not convert correctly.
2017-04-11py/objint: Extract small int value directly because type is known.Damien George
2017-04-11unix, windows: Use core-provided KeyboardInterrupt exception object.Damien George
2017-04-11stmhal: Enable parsing of all Pin constructor args by machine.Signal.Damien George
2017-04-11extmod/machine_signal: Support all Pin's arguments to the constructor.Paul Sokolovsky
This implements the orginal idea is that Signal is a subclass of Pin, and thus can accept all the same argument as Pin, and additionally, "inverted" param. On the practical side, it allows to avoid many enclosed parenses for a typical declararion, e.g. for Zephyr: Signal(Pin(("GPIO_0", 1))). Of course, passing a Pin to Signal constructor is still supported and is the most generic form (e.g. Unix port will only support such form, as it doesn't have "builtin" Pins), what's introduces here is just practical readability optimization. "value" kwarg is treated as applying to a Signal (i.e. accounts for possible inversion).
2017-04-10py/runtime: When init'ing kbd intr exc, use tuple ptr instead of object.Damien George
2017-04-10py: Make sure that static emg-exc-buffer is aligned to size of mp_obj_t.Damien George
This buffer is used to allocate objects temporarily, and such objects require that their underlying memory be correctly aligned for their data type. Aligning for mp_obj_t should be sufficient for emergency exceptions, but in general the memory buffer should aligned to the maximum alignment of the machine (eg on a 32-bit machine with mp_obj_t being 4 bytes, a double may not be correctly aligned). This patch fixes a bug for certain nan-boxing builds, where mp_obj_t is 8 bytes and must be aligned to 8 bytes (even though the machine is 32 bit).
2017-04-09docs/uhashlib: Deconditionalize.Paul Sokolovsky
Notes on WiPy incompatibilities with the standard module API are moved under "Known issues" to its documentation.
2017-04-09docs/usocket: Deconditionalize.Paul Sokolovsky
Notes on WiPy incompatibilities with the standard socket module API are moved under "Known issues" to its documentation.