xmclib/CMSIS/RTOS/RTX/UserCodeTemplates/main.c

22 lines
731 B
C
Raw Permalink Normal View History

2024-10-17 17:09:59 +02:00
/*----------------------------------------------------------------------------
* CMSIS-RTOS 'main' function template
*---------------------------------------------------------------------------*/
#define osObjectsPublic // define objects in main module
#include "osObjects.h" // RTOS object definitions
/*
* main: initialize and start the system
*/
int main (void) {
osKernelInitialize (); // initialize CMSIS-RTOS
// initialize peripherals here
// create 'thread' functions that start executing,
// example: tid_name = osThreadCreate (osThread(name), NULL);
osKernelStart (); // start thread execution
}