mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-08-08 03:16:40 +03:00
Initial commit
This commit is contained in:
28
external/CMSIS_5/CMSIS/RTOS2/RTX/Template/main.c
vendored
Normal file
28
external/CMSIS_5/CMSIS/RTOS2/RTX/Template/main.c
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/*----------------------------------------------------------------------------
|
||||
* CMSIS-RTOS 'main' function template
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "RTE_Components.h"
|
||||
#include CMSIS_device_header
|
||||
#include "cmsis_os2.h"
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Application main thread
|
||||
*---------------------------------------------------------------------------*/
|
||||
__NO_RETURN static void app_main (void *argument) {
|
||||
(void)argument;
|
||||
// ...
|
||||
for (;;) {}
|
||||
}
|
||||
|
||||
int main (void) {
|
||||
|
||||
// System Initialization
|
||||
SystemCoreClockUpdate();
|
||||
// ...
|
||||
|
||||
osKernelInitialize(); // Initialize CMSIS-RTOS
|
||||
osThreadNew(app_main, NULL, NULL); // Create application main thread
|
||||
osKernelStart(); // Start thread execution
|
||||
for (;;) {}
|
||||
}
|
Reference in New Issue
Block a user