- 11 3月, 2020 16 次提交
-
-
由 Damien George 提交于
-
由 Andrew Leech 提交于
This commit adds micropython.heap_locked() which returns the current lock-depth of the heap, and can be used by Python code to check if the heap is locked or not. This new function is configured via MICROPY_PY_MICROPYTHON_HEAP_LOCKED and is disabled by default. This commit also changes the return value of micropython.heap_unlock() so it returns the current lock-depth as well.
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
This is an extremely minimal port to the NXP i.MX RT, in the style of the SAMD port It's largely based on the TinyUSB mimxrt implementation, using the NXP SDK. It currently supports the Teensy 4.0 board with a REPL over the USB-VCP interface. This commit also adds the NXP SDK submodule (also from TinyUSB) to lib/nxp_driver. Note: if you already have the tinyusb submodule initialized recursively you will need to run the following as the tinyusb sub-submodules have been rearranged (upstream): git submodule deinit lib/tinyusb rm -rf .git/modules/lib/tinyusb git submodule update --init lib/tinyusb
-
由 Jim Mussared 提交于
-
由 Jim Mussared 提交于
-
由 Andrew Leech 提交于
To match file objects. Fixes issue #5581.
-
由 David Lechner 提交于
This eliminates the need for the sizeof regex fixup by rearranging things a bit. All other bitfields already use the parentheses around expressions with sizeof, so one case is fixed by following this convention. VM_MAX_STATE_ON_STACK is the only remaining problem and it can be worked around by changing the order of the operands.
-
由 Tom Collins 提交于
The double-% was added in 11de8399 (Jun 2014) when such errors were formatted with printf. But then 55830dd9 (Dec 2018) changed mp_obj_new_exception_msg() to not format the message, as discussed in #3004. So such error strings are no longer formatted and a % is just that.
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
This is needed for BLE.config('mac') to work on esp32.
-
由 Damien George 提交于
This commit changes the BLE _IRQ_SCAN_RESULT data from: addr_type, addr, connectable, rssi, adv_data to: addr_type, addr, adv_type, rssi, adv_data This allows _IRQ_SCAN_RESULT to handle all scan result types (not just connectable and non-connectable passive scans), and to distinguish between them using adv_type which is an integer taking values 0x00-0x04 per the BT specification. This is a breaking change to the API, albeit a very minor one: the existing connectable value was a boolean and True now becomes 0x00, False becomes 0x02. Documentation is updated and a test added. Fixes #5738.
-
由 Thomas Friebel 提交于
This fixes a crash, caused by NimBLE continuing to call the Python BLE interrupt handler after soft reboot.
-
由 Thomas Friebel 提交于
Most error handling is done via `bluetooth_handle_errno()` already. Replace the remaining few manual checks with calls to that function.
-
由 Jim Mussared 提交于
This commit ensures that the BLE stack is active before allowing operations that may otherwise crash if it's not active. It also clarifies the state better (adding the "stopping" state) and renames mp_bluetooth_is_enabled to the more self-explanatory mp_bluetooth_is_active.
-
- 10 3月, 2020 1 次提交
-
-
由 Damien George 提交于
Otherwise ets_loop_iter may be reentered. Related to issue #5714.
-
- 09 3月, 2020 17 次提交
-
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
-
由 Damien George 提交于
This commit adds a test runner and initial test scripts which run multiple Python/MicroPython instances (eg executables, target boards) in parallel. This is useful for testing, eg, network and Bluetooth functionality. Each test file has a set of functions called instanceX(), where X ranges from 0 up to the maximum number of instances that are needed, N-1. Then run-multitests.py will execute this script on N separate instances (eg micropython executables, or attached boards via pyboard.py) at the same time, synchronising their start in the right order, possibly passing IP address (or other address like bluetooth MAC) from the "server" instance to the "client" instances so they can connect to each other. It then runs them to completion, collects the output, and then tests against what CPython gives (or what's in a provided .py.exp file). The tests will be run using the standard unix executable for all instances by default, eg: $ ./run-multitests.py multi_net/*.py Or they can be run with a board and unix executable via: $ ./run-multitests.py --instance pyb:/dev/ttyACM0 --instance exec:micropython multi_net/*.py
-
由 Damien George 提交于
-
由 Damien George 提交于
Now all HCI specific code (eg UART vs WB55 internal messaging) is confined to modbluetooth_hci.c.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
-
由 Damien George 提交于
For use by other stacks, if they need it. Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
This makes a cleaner separation between the: driver, HCI UART and BT stack. Also updated the naming to be more consistent (mp_bluetooth_hci_*). Work done in collaboration with Jim Mussared aka @jimmo.
-
- 06 3月, 2020 2 次提交
-
-
由 Damien George 提交于
Move extmod/modbluetooth_nimble.* to extmod/nimble. And move common Makefile lines to extmod/nimble/nimble.mk (which was previously only used by stm32). This allows (upcoming) btstack to follow a similar structure. Work done in collaboration with Jim Mussared aka @jimmo.
-
由 Damien George 提交于
The bluetooth stack has its own dedicated polling function, see mod_bluetooth_nimble_poll_wrapper().
-
- 05 3月, 2020 1 次提交
-
-
由 MikeTeachman 提交于
When using a manifest on Windows the reference to mpy-cross compiler was missing the .exe file extension, so add it when appropriate. Also allow the default path to mpy-cross to be overridden by the (optional) MICROPY_MPYCROSS environment variable, to allow full flexibility on any OS.
-
- 04 3月, 2020 1 次提交
-
-
由 Damien George 提交于
sys.stdout.flush() is needed on CPython to flush the output, and the change in this commit makes such an expression also work on MicroPython (although MicroPython doesn't actual need to do any flushing).
-
- 03 3月, 2020 1 次提交
-
-
由 Damien George 提交于
-
- 28 2月, 2020 1 次提交
-
-
由 Damien George 提交于
CPython allows this and it's a simple generalisation of the existing code which just supported str/bytes. Fixes issue #5704.
-