From f83e233b86880ed6f938277153fdd9e39f318d37 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Tue, 7 Jun 2022 18:34:31 +0200 Subject: [PATCH] esp32: register vhci callback after enabling controller --- port/esp32/components/btstack/btstack_port_esp32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/port/esp32/components/btstack/btstack_port_esp32.c b/port/esp32/components/btstack/btstack_port_esp32.c index 0e85f563b..0eb728d83 100644 --- a/port/esp32/components/btstack/btstack_port_esp32.c +++ b/port/esp32/components/btstack/btstack_port_esp32.c @@ -241,7 +241,6 @@ static int transport_open(void){ return -1; } - esp_vhci_host_register_callback(&vhci_host_cb); } // Enable classic mode by default @@ -261,6 +260,8 @@ static int transport_open(void){ return -1; } + esp_vhci_host_register_callback(&vhci_host_cb); + return 0; }