aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-12-09stm32/boards/xxx_WB55: Enable littlefs2 on WB55 boards.Damiano Mazzella
2019-12-05nrf/main: Execute boot.py/main.py frozen modules without a file system.Andrej Krejcir
When the file system is not enabled, the boot.py and main.py modules will still be executed, if they are frozen.
2019-12-05stm32/uart: Add support for UART4/5 on L0 MCUs.Chris Mason
2019-12-05esp32/boards: Enable ULP in base sdk configuration.Andrew Leech
Fixes issue #5159.
2019-12-05extmod/modbluetooth: Allow setting ringbuf size via BLE.config(rxbuf=).Damien George
The size of the event ringbuf was previously fixed to compile-time config value, but it's necessary to sometimes increase this for applications that have large characteristic buffers to read, or many events at once. With this commit the size can be set via BLE.config(rxbuf=512), for example. This also resizes the internal event data buffer which sets the maximum size of incoming data passed to the event handler.
2019-12-04extmod/modbluetooth: Add optional 4th arg to gattc_write for write mode.Damien George
This allows the user to explicitly select the behaviour of the write to the remote peripheral. This is needed for peripherals that have characteristics with WRITE_NO_RESPONSE set (instead of normal WRITE). The function's signature is now: BLE.gattc_write(conn_handle, value_handle, data, mode=0) mode=0 means write without response, while mode=1 means write with response. The latter was the original behaviour so this commit is a change in behaviour of this method, and one should specify 1 as the 4th argument to get back the old behaviour. In the future there could be more modes supported, such as long writes.
2019-12-04docs: Add littlefs docs and a filesystem tutorial.Jim Mussared
2019-12-04docs/library: Add docs for pyb.Flash class.Jim Mussared
2019-12-04docs/reference: Add docs describing use of pyboard.py.Jim Mussared
2019-12-04docs: Remove spaces on lines that are empty.Damien George
2019-12-04stm32/mpconfigport.h: Use IRQ_PRI_PENDSV to protect bluetooth ringbuf.Damien George
The default protection for the BLE ringbuf is to use MICROPY_BEGIN_ATOMIC_SECTION, which disables all interrupts. On stm32 it only needs to disable the lowest priority IRQ, pendsv, because that's the IRQ level at which the BLE stack is driven.
2019-12-03mpy-cross: Support armv7em, armv7emsp, armv7emdp architectures.Damien George
2019-12-02extmod/modbluetooth: Remove limit on data coming from gattc data input.Damien George
This removes the limit on data coming in from a BLE.gattc_read() request, or a notify with payload (coming in to a central). In both cases the data coming in to the BLE callback is now limited only by the available data in the ringbuf, whereas before it was capped at (default hard coded) 20 bytes.
2019-12-02extmod/modbluetooth: Simplify how BLE IRQ callback is scheduled.Damien George
Instead of enqueue_irq() inspecting the ringbuf to decide whether to schedule the IRQ callback (if ringbuf is empty), maintain a flag that knows if the callback is on the schedule queue or not. This saves about 150 bytes of code (for stm32 builds), and simplifies all uses of enqueue_irq() and schedule_ringbuf().
2019-11-28tools/mpy-tool.py: Support qstr linking when freezing Xtensa native mpy.Damien George
2019-11-27stm32/main: Fix auto creation of pyb.Flash on boot with kw-only args.Damien George
2019-11-27stm32/boards/NUCLEO_L073RZ: Skip board-pin names for CPU only pins.Damien George
This board doesn't have much flash and removing these unneeded names saves about 900 bytes of code size.
2019-11-27stm32/qstrdefsport.h: Remove unused qstrs and make USB ones conditional.Damien George
qstrs in this file are always included in all builds, even if not used anywhere. So remove those that are never needed, and make USB names conditional on having USB enabled.
2019-11-26py: Remove 3 obsolete commented-out lines from header files.Damien George
2019-11-26stm32/storage: Make start/len args of pyb.Flash keyword only.Damien George
To allow the future possibility of initial positional args, like flash id.
2019-11-26py/objstringio: Slightly optimize stringio_copy_on_write for code size.Yonatan Goldschmidt
With the memcpy() call placed last it avoids the effects of registers clobbering. It's definitely effective in non-inlined functions, but even here it is still making a small difference. For example, on stm32, this saves an extra `ldr` instruction to load `o->vstr` after the memcpy() returns.
2019-11-26tests/stress: Add test for maximum length limit of qstrs.Damien George
2019-11-26py/qstr: Raise exception in qstr_from_strn if str to intern is too long.Léa Saviot
The string length being longer than the allowed qstr length can happen in many locations, for example in the parser with very long variable names. Without an explicit check that the length is within range (as done in this patch) the code would exhibit crashes and strange behaviour with truncated strings.
2019-11-26py/builtinimport: Raise exception on empty module name.Léa Saviot
To prevent a crash returning MP_OBJ_NULL. A test is added for this case.
2019-11-26extmod/vfs_lfs: Fix bug when passing no args to constructor and mkfs.Damien George
2019-11-26stm32/storage: Change storage_read/write_blocks to return int type.Damien George
And return -MP_EIO if calling storage_read_block/storage_write_block fails. This lines up with the return type and value (negative for error) of the calls to MICROPY_HW_BDEV_READBLOCKS (and WRITEBLOCKS, and BDEV2 versions).
2019-11-26stm32/boards: Enable LFS2 on PYBv1.x and PYBD boards.Damien George
2019-11-26extmod/vfs_lfs: Pass flag along to ioctl when init'ing bdev for lfs.Damien George
To hint to the block device that the extended block protocol will be used.
2019-11-26stm32/moduos: Add VfsLfs1 and VfsLfs2 to uos module, if enabled.Damien George
2019-11-26stm32/main: Auto detect block device used for main filesystem.Damien George
2019-11-26stm32/storage: Make pyb.Flash configurable, and support ext block proto.Damien George
The pyb.Flash() class can now be used to construct objects which reference sections of the flash storage, starting at a certain offset and going for a certain length. Such objects also support the extended block protocol. The signature for the constructor is: pyb.Flash(start=-1, len=-1).
2019-11-25stm32: Generalise flash mounting code so it supports arbitrary FS.Damien George
This commit refactors and generalises the boot-mount routine on stm32 so that it can mount filesystems of arbitrary type. That is, it no longer assumes that the filesystem is FAT. It does this by using mp_vfs_mount() which does auto-detection of the filesystem type.
2019-11-25examples/bluetooth: Add example for reading temperature sensor.Jim Mussared
2019-11-25examples/bluetooth: Add helpers for decoding advertising payloads.Jim Mussared
Extracts name and service UUID fields.
2019-11-25extmod/modbluetooth: Simplify management of pre-allocated event data.Jim Mussared
The address, adv payload and uuid fields of the event are pre-allocated by modbluetooth, and reused in the IRQ handler. Simplify this and move all storage into the `mp_obj_bluetooth_ble_t` instance. This now allows users to hold on to a reference to these instances without crashes, although they may be overwritten by future events. If they want to hold onto the values longer term they need to copy them.
2019-11-25stm32/nimble_hci_uart.c: Prevent scheduler running during CYW-BT wakeup.Jim Mussared
Using mp_hal_delay_ms allows the scheduler to run, which might result in another transmit operation happening, which would bypass the sleep (and fail). Use mp_hal_delay_us instead.
2019-11-25extmod/modbluetooh_nimble: Fix UUID conversion for 16 and 32 bit values.Jim Mussared
2019-11-25extmod/modbluetooth_nimble: Make gap_scan_stop no-op if no scan ongoing.Jim Mussared
No need for this to throw an exception if the intent (don't be scanning) is clear, and avoids a race with the scan duration timeout.
2019-11-25extmod/modbluetooth: Create UUID from bytes and allow comparison ops.Jim Mussared
This allows construction of UUID objects from advertising data payloads and matching against known UUIDs.
2019-11-21esp32/machine_rtc: Reduce memory footprint of user mem functionality.Josh Lloyd
2019-11-21esp32/machine_rtc: Make RTC.memory size and availability configurable.Josh Lloyd
The compile-time configuration value MICROPY_HW_RTC_USER_MEM_MAX can now be used to define the amount of memory set aside for RTC.memory(). If this value is configured to zero then the RTC.memory functionality is not included in the build.
2019-11-21py/compile: Coalesce error message for break/continue outside loop.Petr Viktorin
To reduce code size.
2019-11-21unix/modtermios: Fix output speed setter in tcsetattr.Laurens Valk
The input speed was being set twice and the output speed was not set.
2019-11-21extmod/modbluetooth: Prioritise non-scan-result events.Jim Mussared
Remove existing scan result events from the ringbuf if the ringbuf is full and we're trying to enqueue any other event. This is needed so that events such as SCAN_COMPLETE are always put on the ringbuf.
2019-11-21py/ringbuf: Add peek16 method.Jim Mussared
2019-11-15qemu-arm: Add ldscript dependency in the final firmware.elf target.Yonatan Goldschmidt
So that the target is rebuilt if the linker script changes.
2019-11-13py/objdict: Support ujson.dump() of OrderedDict objects.Andrew Leech
Following CPython, OrderedDict are dumped with the syntax of dict.
2019-11-13esp32/rtc: Set system microseconds when setting time via RTC.datetime().Josh Lloyd
2019-11-13tools/makemanifest.py: Use sys.executable when invoking Python scripts.Yonatan Goldschmidt
So the version of Python used to run makemanifest.py is also used for the sub-scripts.
2019-11-12docs/library/ubluetooth: Fix name and link to FLAG_xxx constants.Damien George