Skip to content

Commit 9e6885a

Browse files
committed
extmod/btstack: Switch to use hci_dump_init instead of hci_dump_open.
The latter is no longer available in the version of BTstack now in use by this repository. Signed-off-by: Damien George <damien@micropython.org>
1 parent ec1eecc commit 9e6885a

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

extmod/btstack/btstack.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ INC += -I$(BTSTACK_DIR)/3rd-party/yxml
3535
SRC_BTSTACK_C = \
3636
$(addprefix lib/btstack/src/, $(SRC_FILES)) \
3737
$(addprefix lib/btstack/src/ble/, $(filter-out %_tlv.c, $(SRC_BLE_FILES))) \
38+
lib/btstack/platform/embedded/hci_dump_embedded_stdout.c \
3839

3940
ifeq ($(MICROPY_BLUETOOTH_BTSTACK_USB),1)
4041
ifeq ($(MICROPY_BLUETOOTH_BTSTACK_H4),1)

extmod/btstack/btstack_config_common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#define ENABLE_LE_CENTRAL
88
// #define ENABLE_CLASSIC
99
#define ENABLE_L2CAP_LE_CREDIT_BASED_FLOW_CONTROL_MODE
10+
#define ENABLE_PRINTF_HEXDUMP
1011
// #define ENABLE_LOG_INFO
1112
// #define ENABLE_LOG_DEBUG
1213
#define ENABLE_LOG_ERROR

ports/stm32/mpbtstackport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#include "lib/btstack/src/btstack.h"
3434
#include "lib/btstack/src/hci_transport_h4.h"
35+
#include "lib/btstack/platform/embedded/hci_dump_embedded_stdout.h"
3536
#include "extmod/mpbthci.h"
3637
#include "extmod/btstack/btstack_hci_uart.h"
3738
#include "extmod/btstack/modbluetooth_btstack.h"
@@ -140,7 +141,7 @@ void mp_bluetooth_hci_poll(void) {
140141
void mp_bluetooth_btstack_port_init(void) {
141142
btstack_run_loop_init(&mp_btstack_runloop_stm32);
142143

143-
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
144+
// hci_dump_init(hci_dump_embedded_stdout_get_instance());
144145
const hci_transport_t *transport = hci_transport_h4_instance_for_uart(&mp_bluetooth_btstack_hci_uart_block);
145146
hci_init(transport, &hci_transport_config_uart);
146147

ports/unix/mpbtstackport_common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "lib/btstack/platform/embedded/btstack_run_loop_embedded.h"
3636
#include "lib/btstack/platform/embedded/hal_cpu.h"
3737
#include "lib/btstack/platform/embedded/hal_time_ms.h"
38+
#include "lib/btstack/platform/embedded/hci_dump_embedded_stdout.h"
3839

3940
#include "extmod/btstack/modbluetooth_btstack.h"
4041

@@ -81,7 +82,7 @@ uint32_t hal_time_ms(void) {
8182
void mp_bluetooth_btstack_port_init(void) {
8283
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
8384

84-
// hci_dump_open(NULL, HCI_DUMP_STDOUT);
85+
// hci_dump_init(hci_dump_embedded_stdout_get_instance());
8586

8687
#if MICROPY_BLUETOOTH_BTSTACK_H4
8788
mp_bluetooth_btstack_port_init_h4();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy