Function esp_idf_hal::sys::vTaskStartScheduler
source · pub unsafe extern "C" fn vTaskStartScheduler()
Expand description
@cond !DOC_EXCLUDE_HEADER_SECTION task. h @code{c} void vTaskStartScheduler( void ); @endcode @endcond
Starts the real time kernel tick processing. After calling the kernel has control over which tasks are executed and when.
@note: In ESP-IDF the scheduler is started automatically during application startup, vTaskStartScheduler() should not be called from ESP-IDF applications.
See the demo application file main.c for an example of creating tasks and starting the kernel.
Example usage: @code{c} void vAFunction( void ) { // Create at least one task before starting the kernel. xTaskCreate( vTaskCode, “NAME”, STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
// Start the real time kernel with preemption. vTaskStartScheduler ();
// Will not get here unless a task calls vTaskEndScheduler () } @endcode
@cond !DOC_SINGLE_GROUP \defgroup vTaskStartScheduler vTaskStartScheduler @endcond \ingroup SchedulerControl