extmod/modbluetooth: Remove non-sync event support.
This was the original implementation before we had a way to support running events synchronously from the BLE stack.
ESP32 was the last remaining port using this, and now that it's been updated (in https://github.com/micropython/micropython/commit/5dbb822ca4a809ac5cb4513afb0411b4eb8dc3cf & https://github.com/micropython/micropython/commit/e05d0a6335be6a45f29f5d987091b858ad378cfa) we can remove this.
Removes the MICROPY_PY_BLUETOOTH_ENTER. This was previously a no-op on ports (e.g. stm32) using sync events anyway. Replaced with MICROPY_BEGIN_ATOMIC_SECTION where necessary (e.g. unix mpbthciport.c).
Also makes pairing&bonding enabled by default (this was effectively the current behavior as it was enabled when sync events were enabled).
I'm not sure the zephyr port will work with synchronous events... need to check it.
Codecov Report
Merging #8945 (01a08ba) into master (00930b2) will decrease coverage by
0.08%. Report is 2 commits behind head on master. The diff coverage is0.00%.
:exclamation: Current head 01a08ba differs from pull request most recent head 1591446. Consider uploading reports for the commit 1591446 to get more accurate results
@@ Coverage Diff @@
## master #8945 +/- ##
==========================================
- Coverage 98.38% 98.31% -0.08%
==========================================
Files 158 159 +1
Lines 20940 20955 +15
==========================================
Hits 20602 20602
- Misses 338 353 +15
| Files Changed | Coverage Δ | |
|---|---|---|
| ports/unix/mpconfigport.h | 100.00% <ø> (ø) |
|
| py/mpthread.c | 0.00% <0.00%> (ø) |
I have updated this PR to make a common mechanism for having RTOS tasks call into a MicroPython thread.
This replaces the MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS_WITH_INTERLOCK that was previously used specifically for ESP32, and allows the Unix (and soon, Zephyr) port to use the same functionality (and remove all the special scheduler handling in unix/mpbthciport.c).
Code size report:
Are there any plans for the merge of this PR?
Are there any plans for the merge of this PR?
Yes. See https://github.com/micropython/micropython/pull/8945#issuecomment-1718852697 -- still some more work to go on this, and need to update the Zephyr port to use it.
This is an automated heads-up that we've just merged a Pull Request that removes the STATIC macro from MicroPython's C API.
See https://github.com/micropython/micropython/pull/13763
A search suggests this PR might apply the STATIC macro to some C code. If it
does, then next time you rebase the PR (or merge from master) then you should
please replace all the STATIC keywords with static.
Although this is an automated message, feel free to @-reply to me directly if you have any questions about this.