summaryrefslogtreecommitdiff
path: root/extmod
AgeCommit message (Collapse)Author
2020-10-25ulab: Update againJeff Epler
.. pull in various doc build fixes that prevented the previous commit from building. This is still "0.54.5", the tag was updated in micropython-ulab (since no functional difference was introduced, only doc and CI differences, I imagine)
2020-10-24ulab: Incorporate bugfixes (update to tag 0.54.5)Jeff Epler
In particular, this closes #3954.
2020-10-07Unify iMX flash config and add Metro M7 1011Scott Shawcroft
This unifies the flash config to the settings used by the Boot ROM. This makes the config unique per board which allows for changing quad enable and status bit differences per flash device. It also allows for timing differences due to the board layout. This change also tweaks linker layout to leave more ram space for the CircuitPython heap.
2020-09-12Add FALLTHROUGH comments as neededJeff Epler
I investigated these cases and confirmed that the fallthrough behavior was intentional.
2020-08-04Combine 'index out of range' messagesJeff Epler
2020-08-04various: Use mp_obj_get_type_qstr more widelyJeff Epler
This removes runtime allocations of the cstring version of the qstring. It is not a size improvement
2020-07-28Upgrade ulabJeff Epler
This version * moves source files to reflect module structure * adds inline documentation suitable for extract_pyi * incompatibly moves spectrogram to fft * incompatibly removes "extras" There are some remaining markup errors in the specific revision of extmod/ulab but they do not prevent the doc building process from completing.
2020-07-16Merge pull request #3143 from tannewt/improve_jsonDan Halbert
Add support to json.load for any object with readinto
2020-07-10Fix stream version and add basic readinto testScott Shawcroft
2020-07-10Add support to json.load for any object with readintoScott Shawcroft
This way we don't need to load the whole string version of the json into memory.
2020-07-06Add license to some obvious files.Diego Elio Pettenò
2020-07-01ulab: update to 0.51.1Jeff Epler
2020-06-25remove machine_i2c, machine_spiJeff Epler
This micropython code is not used in circuitpython
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-01ulab: update submodule againJeff Epler
2020-06-01ulab: updateJeff Epler
.. add new modules and functions to our shared-bindings stubs
2020-05-10ujson: back out overeager loads() change; only change load()warriorofwire
2020-05-10ujson: do not eat trailing whitespacewarriorofwire
Ujson should only worry about whitespace before JSON. This becomes apparent when you are using MP stream protocol to read directly from input buffers. When you attempt to read(1) on a UART (and possibly other protocols) you have to wait for either the byte or the timeout. Fixes: - Waiting for a timeout after you have completed reading a correct and complete JSON off the input. - Raising an OSError after reading a correct and complete JSON off the input. - Eating more data than semantically owned off the input buffer. - Blocking to start parsing JSON until the entire JSON body has been loaded into a potentially large, contiguous Python object. Code you would write before: ``` line = board_busio_uart_port.read_line() json_dict = json.loads(line) ``` or reaching for fixed buffers and swapping them around in Python. Code that did not work before that does now: ``` json_dict = json.load(board_busio_uart_port) ``` - This removes the need for intermediate copies of data when reading JSON from micropython stream protocol inputs. - It also increases total application speed by parsing JSON concurrently with receiving on boards that read from UART via DMA. - It simplifies code that users write while improving their apps.
2020-04-27ulab: updateJeff Epler
2020-04-26ulab: actually update the submoduleJeff Epler
PR#2802 missed the submodule update itself.
2020-04-14ulab: Get updates from upstreamJeff Epler
2020-04-13ulab: Get updates from upstreamJeff Epler
2020-03-17update ulabJeff Epler
2020-03-09ulab: Use https://github.com/v923z/micropython-ulab/Jeff Epler
The only delta we were carrying was in the README.
2020-02-27Update ulab from upstream againJeff Epler
2020-02-27ulab: Incorporate itJeff Epler
2020-02-14avoid os.stat() int overflow on smallint-only buildsDan Halbert
2020-02-04preserve errno in OSErrorDan Halbert
2020-02-04Include filename for 'No such file/directory', etc.Dan Halbert
2020-01-27Fix subclassing of objects that are tested. Others may still be broken.Scott Shawcroft
2020-01-02remove unnecessary GCC pragmasRoy Hooper
2020-01-02raise mp_raise_NotImplementedErrorRoy Hooper
2019-12-13Revert subscr signature changeRoy Hooper
2019-12-13push changesRoy Hooper
2019-12-10Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-12-04protocols: Allow them to be (optionally) type-safeJeff Epler
Protocols are nice, but there is no way for C code to verify whether a type's "protocol" structure actually implements some particular protocol. As a result, you can pass an object that implements the "vfs" protocol to one that expects the "stream" protocol, and the opposite of awesomeness ensues. This patch adds an OPTIONAL (but enabled by default) protocol identifier as the first member of any protocol structure. This identifier is simply a unique QSTR chosen by the protocol designer and used by each protocol implementer. When checking for protocol support, instead of just checking whether the object's type has a non-NULL protocol field, use `mp_proto_get` which implements the protocol check when possible. The existing protocols are now named: protocol_framebuf protocol_i2c protocol_pin protocol_stream protocol_spi protocol_vfs (most of these are unused in CP and are just inherited from MP; vfs and stream are definitely used though) I did not find any crashing examples, but here's one to give a flavor of what is improved, using `micropython_coverage`. Before the change, the vfs "ioctl" protocol is invoked, and the result is not intelligible as json (but it could have resulted in a hard fault, potentially): >>> import uos, ujson >>> u = uos.VfsPosix('/tmp') >>> ujson.load(u) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: syntax error in JSON After the change, the vfs object is correctly detected as not supporting the stream protocol: >>> ujson.load(p) Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: stream operation not supported
2019-11-26remove unnecessary intermediate mp_obj_subscr wrapperRoy Hooper
2019-11-23disable -Wunused-parameter on subscr functionsRoy Hooper
2019-11-23Merge branch 'master' into new-pixelbuf-apiRoy Hooper
2019-11-23make ->subscr take an instance to pass when instance_subscr is called from ↵Roy Hooper
subscr.
2019-10-13Move font dependency to extmod from stm32Dan Halbert
2019-03-13Prevent other filesystem changes besides file writesScott Shawcroft
Such as moving files, adding directories and changing the label.
2019-03-13Throw an error when moving a directory into itself.Scott Shawcroft
Fixes #1192
2019-02-21Merge pull request #1584 from tannewt/disable_concurrent_write_protectionDan Halbert
Add option to disable the concurrent write protection
2019-02-21Merge pull request #1582 from dhalbert/remove-u-namesScott Shawcroft
rename ure, ujson, and uerrno to re, json, and errno
2019-02-21conditionalize re object type nameDan Halbert
2019-02-21Add option to disable the concurrent write protectionScott Shawcroft
This allows writing to the filesystem from the host computer and CircuitPython by increasing the risk of filesystem corruption.
2019-02-21Add CIRCUITPY macro; rename u* only when CIRCUITPY=1Dan Halbert
2019-02-21rename ure, ujson, and uerrno to re, json, and errnoDan Halbert
2019-02-19Prevent infinite display update recursion and fix VFS mountingScott Shawcroft
Fixes #1529