Skip to content

Commit 7309f13

Browse files
committed
Add support for unicore SoCs (esp32-c3)
Fixes #203
1 parent b5bf249 commit 7309f13

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

main/Kconfig.projbuild

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
menu "BLE2MQTT"
2+
config BLE2MQTT_PINNED_TO_CORE
3+
int
4+
default 1 if !FREERTOS_UNICORE
5+
default 0
6+
endmenu

main/ble2mqtt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ static int start_ble2mqtt_task(void)
705705
return -1;
706706

707707
if (xTaskCreatePinnedToCore(ble2mqtt_task, "ble2mqtt_task", 4096, NULL, 5,
708-
NULL, 1) != pdPASS)
708+
NULL, CONFIG_BLE2MQTT_PINNED_TO_CORE) != pdPASS)
709709
{
710710
return -1;
711711
}

main/ota.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ int ota_download(ota_type_t type, const char *url, ota_on_completed_cb_t cb)
237237
ctx->url = strdup(url);
238238
ctx->on_completed_cb = cb;
239239

240-
xTaskCreatePinnedToCore(ota_task, "ota_task", 8192, ctx, 5, NULL, 1);
240+
xTaskCreatePinnedToCore(ota_task, "ota_task", 8192, ctx, 5, NULL,
241+
CONFIG_BLE2MQTT_PINNED_TO_CORE);
241242

242243
return 0;
243244
}

0 commit comments

Comments
 (0)