summaryrefslogtreecommitdiffstatshomepage
path: root/extmod/btstack/btstack_hci_uart.c
Commit message (Collapse)AuthorAge
* all: Remove the "STATIC" macro and just use "static" instead.Angus Gratton2024-03-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The STATIC macro was introduced a very long time ago in commit d5df6cd44a433d6253a61cb0f987835fbc06b2de. The original reason for this was to have the option to define it to nothing so that all static functions become global functions and therefore visible to certain debug tools, so one could do function size comparison and other things. This STATIC feature is rarely (if ever) used. And with the use of LTO and heavy inline optimisation, analysing the size of individual functions when they are not static is not a good representation of the size of code when fully optimised. So the macro does not have much use and it's simpler to just remove it. Then you know exactly what it's doing. For example, newcomers don't have to learn what the STATIC macro is and why it exists. Reading the code is also less "loud" with a lowercase static. One other minor point in favour of removing it, is that it stops bugs with `STATIC inline`, which should always be `static inline`. Methodology for this commit was: 1) git ls-files | egrep '\.[ch]$' | \ xargs sed -Ei "s/(^| )STATIC($| )/\1static\2/" 2) Do some manual cleanup in the diff by searching for the word STATIC in comments and changing those back. 3) "git-grep STATIC docs/", manually fixed those cases. 4) "rg -t python STATIC", manually fixed codegen lines that used STATIC. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
* extmod/btstack/btstack_hci_uart: Trigger a poll after UART data is sent.Damien George2023-09-29
| | | | | | | | | | | | | Prior to this commit, BTstack would only be notified of sent UART data when the mp_bluetooth_hci_poll() function was called for some other reason, eg because of incoming data over UART. This is highly suboptimal. With this commit, BTstack is now notified immediately after UART data has been sent out. This improves the multi_bluetooth/perf_gatt_char_write.py performance test by about a factor of 10x for write-without-response, and about 4x for write-with-response (tested on LEGO_HUB_NO6 as instance1). Signed-off-by: Damien George <damien@micropython.org>
* extmod/btstack: Update BTstack bindings to work with latest BTstack.Damien George2022-10-22
| | | | | | | | | | | | | | | | | | | The following multi-tests pass (eg with PYBD_SF6+LEGO_HUB_NO6): ble_gap_advertise.py ble_gap_connect.py ble_gap_device_name.py ble_gattc_discover_services.py ble_gatt_data_transfer.py perf_gatt_char_write.py perf_gatt_notify.py stress_log_filesystem.py These are the same tests that passed prior to this BTstack update. Also tested on the unix port using H4 transport. Signed-off-by: Damien George <damien@micropython.org>
* extmod/btstack: Add missing call to mp_bluetooth_hci_uart_deinit.Damien George2021-06-23
| | | | Signed-off-by: Damien George <damien@micropython.org>
* extmod/btstack: Use MICROPY_HW_BLE_UART_BAUDRATE for first UART init.Damien George2021-02-17
| | | | | | Otherwise the UART may be left in a state at baudrate=0. Signed-off-by: Damien George <damien@micropython.org>
* extmod/btstack: Add HCI trace debugging option in btstack_hci_uart.Damien George2021-02-12
| | | | Signed-off-by: Damien George <damien@micropython.org>
* extmod/btstack: Detect HCI UART init failure.Jim Mussared2020-09-08
|
* extmod/modbluetooth: Refactor stack/hci/driver/port bindings.Jim Mussared2020-09-08
Previously the interaction between the different layers of the Bluetooth stack was different on each port and each stack. This commit defines common interfaces between them and implements them for cyw43, btstack, nimble, stm32, unix.