summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-27tests/extmod/ucryptolib*: Add tests for ucryptolib module.Paul Sokolovsky
2018-06-27extmod/moducryptolib: Add ucryptolib module with crypto functions.Paul Sokolovsky
The API follows guidelines of https://www.python.org/dev/peps/pep-0272/, but is optimized for code size, with the idea that full PEP 0272 compatibility can be added with a simple Python wrapper mode. The naming of the module follows (u)hashlib pattern. At the bare minimum, this module is expected to provide: * AES128, ECB (i.e. "null") mode, encrypt only Implementation in this commit is based on axTLS routines, and implements following: * AES 128 and 256 * ECB and CBC modes * encrypt and decrypt
2018-06-26docs/library: Add documentation for ucollections.deque.Damien George
2018-06-26stm32/mboot: Always use a flash latency of 1WS to match 48MHz HCLK.Damien George
2018-06-26stm32/mboot: Only compile in code for the USB periph that is being used.Damien George
Prior to this patch, if both USB FS and HS were enabled via the configuration file then code was included to handle both of their IRQs. But mboot only supports listening on a single USB peripheral, so this patch excludes the code for the USB that is not used.
2018-06-25stm32/mboot: Fix bug with invalid memory access of USB state.Damien George
Only one of pcd_fs_handle/pcd_hs_handle is ever initialised, so if both of these USB peripherals are enabled then one of these if-statements will access invalid memory pointed to by an uninitialised Instance. This patch fixes this bug by explicitly referencing the peripheral struct.
2018-06-25docs/esp8266: Fix minor typo in "certificates".jcea
2018-06-23stm32/modnetwork: Fix query of DNS IP address in ifconfig().Damien George
Thanks to @boochow for the fix.
2018-06-22py/compile: Combine expr, xor_expr and and_expr into one function.Damien George
This and the previous 4 commits combined have change in code size of: bare-arm: -92 minimal x86: -544 unix x64: -544 unix nanbox: -712 stm32: -116 cc3200: -128 esp8266: -348 esp32: -232
2018-06-22py/compile: Combine or_test and and_test compile functions.Damien George
2018-06-22py/compile: Combine global and nonlocal statement compile functions.Damien George
2018-06-22py/compile: Combine subscript_2 and subscript_3 into one function.Damien George
2018-06-22py/compile: Combine break and continue compile functions.Damien George
2018-06-22stm32/boards: Add .ld and af.csv files for STM32F722.Damien George
These files can also be used for F723, F732 and F733 MCUs.
2018-06-22tools/pydfu.py: Add support for multiple memory segments.Damien George
Segments are separated by / and begin with the memory address. This follows how the ST DFU tool works.
2018-06-22stm32/mboot: Add support for erase/read/write of external SPI flash.Damien George
This patch adds support to mboot for programming external SPI flash. It allows SPI flash to be programmed via a USB DFU utility in the same way that internal MCU flash is programmed.
2018-06-22stm32/qspi: Don't require data reads and writes to be a multiple of 4.Damien George
Prior to this patch the QSPI driver assumed that the length of all data reads and writes was a multiple of 4. This patch allows any length. Reads are optimised for speed by using 32-bit transfers when possible, but writes always use a byte transfer because they only use a single data IO line and are relatively slow.
2018-06-20py/stream: Remove stray empty line at start of file.Damien George
This was accidentally added in 6abede2ca9e221b6aefcaccbda0c89e367507df1
2018-06-20tests: Add tests using "file" argument in print and sys.print_exception.Damien George
2018-06-20py: Add checks for stream objects in print() and sys.print_exception().Damien George
2018-06-20py/stream: Update comment for mp_stream_write_adaptor.Damien George
2018-06-20stm32/boards/NUCLEO_F091RC: Fix TICK_INT_PRIORITY so it is highest prio.Damien George
Fixes issue #3880.
2018-06-19stm32/mboot: Define constants for reset mode cycling and timeout.Damien George
And fix timeout value so that it does actually finish with reset_mode=1.
2018-06-18tests/import: Add test for importing invalid .mpy file.Damien George
2018-06-18stm32/spi: Fix SPI driver so it can send/recv more than 65535 bytes.Damien George
The DMA peripheral is limited to transferring 65535 elements at a time so in order to send more than that the SPI driver must split the transfers up. The user must be aware of this limit if they are relying on precise timing of the entire SPI transfer, because there might be a small delay between the split transfers. Fixes issue #3851, and thanks to @kwagyeman for the original fix.
2018-06-18stm32/can: Use MP_OBJ_ARRAY_TYPECODE_FLAG_RW where appropriate.Damien George
2018-06-18py/objarray: Replace 0x80 with new MP_OBJ_ARRAY_TYPECODE_FLAG_RW macro.Damien George
2018-06-18stm32/boards/NUCLEO_F091RC: Add Arduino-named pins and rename CPU pins.rolandvs
To match pin labels on other NUCLEO 64 boards.
2018-06-18stm32/boards/stm32f091_af.csv: Split labels that are multiple funcs.rolandvs
2018-06-18tests/extmod: Add test for ujson.dump writing to a user IOBase object.Damien George
2018-06-18tests/extmod/ujson_dump.py: Add test for dump to non-stream object.Damien George
2018-06-18tests/unix/extra_coverage: Don't test stream objs with NULL write fun.Damien George
This behaviour of a NULL write C method on a stream that uses the write adaptor objects is no longer supported. It was only ever used by the coverage build for testing the fail path of mp_get_stream_raise().
2018-06-18extmod: Update to use new mp_get_stream helper.Damien George
With this patch objects are only checked that they have the stream protocol at the start of their use as a stream, and afterwards the efficient mp_get_stream() helper is used to extract the stream protocol C methods.
2018-06-18py/stream: Introduce and use efficient mp_get_stream to access stream_p.Damien George
The existing mp_get_stream_raise() helper does explicit checks that the input object is a real pointer object, has a non-NULL stream protocol, and has the desired stream C method (read/write/ioctl). In most cases it is not necessary to do these checks because it is guaranteed that the input object has the stream protocol and desired C methods. For example, native objects that use the stream wrappers (eg mp_stream_readinto_obj) in their locals dict always have the stream protocol (or else they shouldn't have these wrappers in their locals dict). This patch introduces an efficient mp_get_stream() which doesn't do any checks and just extracts the stream protocol struct. This should be used in all cases where the argument object is known to be a stream. The existing mp_get_stream_raise() should be used primarily to verify that an object does have the correct stream protocol methods. All uses of mp_get_stream_raise() in py/stream.c have been converted to use mp_get_stream() because the argument is guaranteed to be a proper stream object. This patch improves efficiency of stream operations and reduces code size.
2018-06-18examples/embedding: Add code markup and fix typo in README.md.Damien George
2018-06-18stm32/mboot: Adjust user-reset-mode timeout so it ends with mode=1.Damien George
If the user button is held down indefinitely (eg unintenionally, or because the GPIO signal of the user button is connected to some external device) then it makes sense to end the reset mode cycle with the default mode of 1, which executes code as normal.
2018-06-16extmod/vfs_fat_diskio: Factor disk ioctl code to reduce code size.Damien George
Functionality is unchanged.
2018-06-15drivers/sdcard: Fix bug in computing number of sectors on SD Card.Damien George
This was a typo from the very first commit of this file.
2018-06-15drivers/sdcard: Change driver to use new block-device protocol.Damien George
2018-06-15esp32/modules: Include umqtt library in frozen modules.Damien George
2018-06-15esp32: Update to latest ESP IDF.Damien George
2018-06-15stm32/i2cslave: Fix ordering of event callbacks in slave IRQ handler.Damien George
It's possible (at least on F4 MCU's) to have RXNE and STOPF set at the same time during a call to the slave IRQ handler. In such cases RXNE should be handled before STOPF so that all bytes are processed before i2c_slave_process_rx_end() is called.
2018-06-15stm32/i2c: Fix num_acks calculation in i2c_write for F0 and F7 MCU's.Damien George
Due to buffering of outgoing bytes on the I2C bus, detection of a NACK using the ISR_NACKF flag needs to account for the case where ISR_NACKF corresponds to the previous-to-previous byte.
2018-06-15stm32/timer: Support TIM1 on F0 MCUs.Damien George
2018-06-14drivers/memory/spiflash: Add functions for direct erase/read/write.Damien George
These new API functions do not use the cache.
2018-06-14drivers/memory/spiflash: Rename functions to indicate they use cache.Damien George
This patch renames the existing SPI flash API functions to reflect the fact that the go through the cache: mp_spiflash_flush -> mp_spiflash_cache_flush mp_spiflash_read -> mp_spiflash_cached_read mp_spiflash_write -> mp_spiflash_cached_write
2018-06-14stm32/boards/STM32L476DISC: Update SPI flash config for cache change.Damien George
2018-06-14drivers/memory/spiflash: Move cache buffer to user-provided config.Damien George
This patch removes the global cache variables from the SPI flash driver and now requires the user to provide the cache memory themselves, via the SPI flash configuration struct. This allows to either have a shared cache for multiple SPI flash devices (by sharing a mp_spiflash_cache_t struct), or have a single cache per device (or a mix of these options). To configure the cache use: mp_spiflash_cache_t spi_bdev_cache; const mp_spiflash_config_t spiflash_config = // any bus options .cache = &spi_bdev_cache, };
2018-06-13esp32/fatfs_port: Implement get_fattime so FAT files have a timestamp.Damien George
Fixes issue #3859.
2018-06-13extmod/modussl_axtls: Fix __del__ to point to mp_stream_close_obj.Damien George