21 lines
731 B
C
21 lines
731 B
C
/*----------------------------------------------------------------------------
|
|
* 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
|
|
}
|