Skip to content

Commit f67bc43

Browse files
authored
Add Bluetooth support to Platform.io (#1259)
1 parent 79e1af7 commit f67bc43

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tools/platformio-build.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,18 @@ def is_pio_build():
8181

8282
# pico support library depends on ipv6 enable/disable
8383
libpico = File(os.path.join(FRAMEWORK_DIR, "lib", "libpico.a"))
84-
if "PIO_FRAMEWORK_ARDUINO_ENABLE_IPV6" in flatten_cppdefines:
84+
if "PIO_FRAMEWORK_ARDUINO_ENABLE_BLUETOOTH" in flatten_cppdefines:
85+
if "PIO_FRAMEWORK_ARDUINO_ENABLE_IPV6" in flatten_cppdefines:
86+
libpicow = File(os.path.join(FRAMEWORK_DIR, "lib", "libpicow-ipv6-btc-ble.a"))
87+
else:
88+
libpicow = File(os.path.join(FRAMEWORK_DIR, "lib", "libpicow-noipv6-btc-ble.a"))
89+
env.Append(
90+
CPPDEFINES=[
91+
("ENABLE_CLASSIC", 1),
92+
("ENABLE_BLE", 1)
93+
]
94+
)
95+
elif "PIO_FRAMEWORK_ARDUINO_ENABLE_IPV6" in flatten_cppdefines:
8596
libpicow = File(os.path.join(FRAMEWORK_DIR, "lib", "libpicow-ipv6-nobtc-noble.a"))
8697
else:
8798
libpicow = File(os.path.join(FRAMEWORK_DIR, "lib", "libpicow-noipv6-nobtc-noble.a"))

0 commit comments

Comments
 (0)