Skip to content

Commit 33ea50e

Browse files
committed
[Bugfix] Set Legacy VHCI correctly - fixes older Arduino core crashes
1 parent 592ddb8 commit 33ea50e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/nimconfig.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,16 @@
161161
# define CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE (2)
162162
# endif
163163

164-
# if !defined(CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE) && \
165-
(defined(CONFIG_IDF_TARGET_ESP32) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S3))
166-
# define CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE (1)
167-
# endif
168-
169164
# if !defined(CONFIG_BT_CONTROLLER_DISABLED)
170165
# define CONFIG_BT_CONTROLLER_DISABLED (0)
171166
# endif
172167

168+
# undef CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE
173169
# if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32S3
170+
# define CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE (1)
174171
# define NIMBLE_CFG_CONTROLLER 0
175172
# else
173+
# define CONFIG_BT_NIMBLE_LEGACY_VHCI_ENABLE (0)
176174
# define NIMBLE_CFG_CONTROLLER CONFIG_BT_CONTROLLER_ENABLED
177175
# endif
178176

0 commit comments

Comments
 (0)