Skip to content

Commit

Permalink
Add support for unicore SoCs (esp32-c3)
Browse files Browse the repository at this point in the history
Fixes #203
  • Loading branch information
shmuelzon committed Oct 11, 2024
1 parent b5bf249 commit 7309f13
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions main/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
menu "BLE2MQTT"
config BLE2MQTT_PINNED_TO_CORE
int
default 1 if !FREERTOS_UNICORE
default 0
endmenu
2 changes: 1 addition & 1 deletion main/ble2mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ static int start_ble2mqtt_task(void)
return -1;

if (xTaskCreatePinnedToCore(ble2mqtt_task, "ble2mqtt_task", 4096, NULL, 5,
NULL, 1) != pdPASS)
NULL, CONFIG_BLE2MQTT_PINNED_TO_CORE) != pdPASS)
{
return -1;
}
Expand Down
3 changes: 2 additions & 1 deletion main/ota.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ int ota_download(ota_type_t type, const char *url, ota_on_completed_cb_t cb)
ctx->url = strdup(url);
ctx->on_completed_cb = cb;

xTaskCreatePinnedToCore(ota_task, "ota_task", 8192, ctx, 5, NULL, 1);
xTaskCreatePinnedToCore(ota_task, "ota_task", 8192, ctx, 5, NULL,
CONFIG_BLE2MQTT_PINNED_TO_CORE);

return 0;
}
Expand Down

0 comments on commit 7309f13

Please sign in to comment.