- Dec 21, 2016
-
-
Damien George authored
This check always fails (ie chr0 is never EOF) because the callers of this function never call it past the end of the input stream. And even if they did it would be harmless because 1) reader.readbyte must continue to return an EOF char if the stream is exhausted; 2) next_char would just count the subsequent EOF's as characters worth 1 column.
-
Damien George authored
-
Damien George authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
import utimeq, utime # Max queue size, the queue allocated statically on creation q = utimeq.utimeq(10) q.push(utime.ticks_ms(), data1, data2) res = [0, 0, 0] # Items in res are filled up with results q.pop(res)
-
Paul Sokolovsky authored
-
Rami Ali authored
-
Rami Ali authored
-
Damien George authored
-
Damien George authored
And also simplify it to remove the check for small int. This can be done because this function is only ever called if the argument is not a small int.
-
Damien George authored
-
- Dec 20, 2016
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
It's pretty rough way to detect yaota8266 being used, but otherwise allows to have a filesystem in such config.
-
Rami Ali authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Native code can hold pointers to objects on the heap, eg constant objects like big integers.
-
- Dec 19, 2016
-
-
Rami Ali authored
-
Paul Sokolovsky authored
-
Damien George authored
It needs an extra pass to compute the size of the constant table for the l32r instructions.
-
- Dec 18, 2016
-
-
Paul Sokolovsky authored
Required for the testsuite.
-
- Dec 16, 2016
-
-
Paul Sokolovsky authored
This is required to avoid extra level of output "cooking" ("\r\r\n") and make test infrastructure work. On the other hand, this breaks somewhat Zephyr console abstraction.
-
- Dec 15, 2016
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
Mike Causer authored
-
Damien George authored
-
Damien George authored
-
Damien George authored
Ultimately all ports that use lib/utils/interrupt_char would enable MICROPY_KBD_EXCEPTION, so this is an interim solution.
-
Damien George authored
Defining and initialising mp_kbd_exception is boiler-plate code and so the core runtime can provide it, instead of each port needing to do it themselves. The exception object is placed in the VM state rather than on the heap.
-
Damien George authored
There's no need to store a separate pointer to this object.
-
Damien George authored
mp_kbd_exception is now considered the standard variable name to hold the singleton KeyboardInterrupt exception. This patch also moves the creation of this object from pyb_usb_init() to main().
-
Damien George authored
Previous to this patch pyboard.py would open a new serial connection to the target for each script that was run, and for any command that was run. Apart from being inefficient, this meant that the board was soft-reset between scripts/commands, which precludes scripts from accessing variables set in a previous one. This patch changes the behaviour of pyboard.py so that the connection to the target is created only once, and it's not reset between scripts or any command that is sent with the -c option.
-
Damien George authored
-
Damien George authored
When printing exceptions from files sent to a target by pyboard.py the filename in the exception is <stdin>, which differs to when running the script on the PC. So we strip out the filename to make the outputs the same on all targets (see also misc/print_exception.py test).
-