T-vK / ESP32-BLE-Mouse

Bluetooth LE Mouse library for the ESP32 (Arduino IDE compatible)
753 stars 145 forks source link

Why xTaskCreate() is used? #51

Open EmuAi opened 1 year ago

EmuAi commented 1 year ago

Hi. I have slightly understood the purposes of task processing of Arduino. I wonder ESP32-BLE-Mouse works well without xTaskCreate(). Does skipping(bypassing) this xTaskCreate() invites some troubles? I believe that skipping may invite some delaying. However ESP32-BLE-Keyboard does not use xTaskCreate(), doesn't it?

KentuLiveAccount commented 1 year ago

I have the same question. Based on FreeRTOS doc, sigle core ESP32 like C3 may suffer stability issue using task/threading functionarity? Also the way it is used is to offload the initalization, which might be a nice thing if worked, but not an essential improvement?

https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/system/freertos_idf.html#freertos-smp-single-core