- 27 Apr, 2017 3 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 26 Apr, 2017 4 commits
-
-
Paul Sokolovsky authored
Otherwise, if we already have a packet in progress, finish it first, before check "peer closed" status.
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Damien George authored
It doesn't do anything. The VFS feature is controlled by MICROPY_VFS and the FatFS driver, by MICROPY_VFS_FAT (which are set in mpconfigport.h).
-
- 25 Apr, 2017 6 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Kushal Das authored
As there's no networking support in mainline yet, networking is disabled, because otherwise the board hangs on startup.
-
Damien George authored
-
Damien George authored
The trailing zeros should be truncated from the converted value.
-
Damien George authored
-
- 22 Apr, 2017 10 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
-
Damien George authored
This patch allows the following code to run without allocating on the heap: super().foo(...) Before this patch such a call would allocate a super object on the heap and then load the foo method and call it right away. The super object is only needed to perform the lookup of the method and not needed after that. This patch makes an optimisation to allocate the super object on the C stack and discard it right after use. Changes in code size due to this patch are: bare-arm: +128 minimal: +232 unix x64: +416 unix nanbox: +364 stmhal: +184 esp8266: +340 cc3200: +128
-
Damien George authored
This patch refactors the handling of the special super() call within the compiler. It removes the need for a global (to the compiler) state variable which keeps track of whether the subject of an expression is super. The handling of super() is now done entirely within one function, which makes the compiler a bit cleaner and allows to easily add more optimisations to super calls. Changes to the code size are: bare-arm: +12 minimal: +0 unix x64: +48 unix nanbox: -16 stmhal: +4 cc3200: +0 esp8266: -56
-
Damien George authored
If we get to this point in the code then pn_iter is guaranteed to be a struct.
-
Damien George authored
Prior to making this a config option it was previously available on these (and all other) ports, and it makes sense to keep it enabled for mpy-cross as well as ports that have a decent amount of space for the code.
-
Damien George authored
With this optimisation enabled the compiler optimises the if-else expression within a return statement. The optimisation reduces bytecode size by 2 bytes for each use of such a return-if-else statement. Since such a statement is not often used, and costs bytes for the code, the feature is disabled by default. For example the following code: def f(x): return 1 if x else 2 compiles to this bytecode with the optimisation disabled (left column is bytecode offset in bytes): 00 LOAD_FAST 0 01 POP_JUMP_IF_FALSE 8 04 LOAD_CONST_SMALL_INT 1 05 JUMP 9 08 LOAD_CONST_SMALL_INT 2 09 RETURN_VALUE and to this bytecode with the optimisation enabled: 00 LOAD_FAST 0 01 POP_JUMP_IF_FALSE 6 04 LOAD_CONST_SMALL_INT 1 05 RETURN_VALUE 06 LOAD_CONST_SMALL_INT 2 07 RETURN_VALUE So the JUMP to RETURN_VALUE is optimised and replaced by RETURN_VALUE, saving 2 bytes and making the code a bit faster.
-
Damien George authored
Otherwise the type of parse-node and its kind has to be re-extracted multiple times. This optimisation reduces code size by a bit (16 bytes on bare-arm).
-
Damien George authored
PN_atom_expr_normal parse nodes always have structs for their second sub-node, so simplify the check for the sub-node kind to save code size.
-
Damien George authored
Saves code size (20 bytes on bare-arm) and makes it a tiny bit more efficient.
-
- 21 Apr, 2017 3 commits
-
-
Paul Sokolovsky authored
-
stijn authored
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.
-
Damien George authored
With 30-bit floats there aren't enough bits to faithfully print 7 decimal digits, so reduce the precision to 6 digits.
-
- 19 Apr, 2017 1 commit
-
-
Paul Sokolovsky authored
-
- 18 Apr, 2017 13 commits
-
-
Henrik Sölver authored
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.
-
Damien George authored
-
Damien George authored
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).
-
Damien George authored
-
Damien George authored
cc3200 has been updated to conform to the API and now returns None.
-
Damien George authored
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.
-
Damien George authored
-
Damien George authored
-
Damien George authored
The cc3200 port is now similar enough to the standard machine.I2C API so that all conditionals can be removed.
-
Damien George authored
-
Damien George authored
-
Damien George authored
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.
-
Damien George authored
stmhal doesn't have a machine.UART class so this section is not needed.
-