mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-30 06:04:20 +00:00
21 lines
710 B
C
21 lines
710 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
|
|
}
|