This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
PTR-RTX5/main.c
2024-02-26 13:55:42 +01:00

47 lines
1.2 KiB
C

/*----------------------------------------------------------------------------
* CMSIS-RTOS 'main' function template
*---------------------------------------------------------------------------*/
#include "RTE_Components.h"
#include CMSIS_device_header
#include "cmsis_os2.h"
#include "EventRecorder.h"
/*----------------------------------------------------------------------------
* Application main thread
*---------------------------------------------------------------------------*/
__NO_RETURN static void app_main (void *argument) {
(void)argument;
// ...
for (;;) {}
}
void task1(void *args) {
(void)args;
for(;;) {}
}
__NO_RETURN static void task2(void *args) {
(void)args;
for(;;) {}
}
__NO_RETURN static void task3(void *args) {
(void)args;
for(;;) {}
}
int main (void) {
// System Initialization
SystemCoreClockUpdate();
EventRecorderInitialize(EventRecordAll, 1U);
osKernelInitialize(); // Initialize CMSIS-RTOS
thread1 = osThreadNew(app_main, NULL, NULL); // Create application main thread
osThreadNew(task1, NULL, NULL);
osThreadNew(task2, NULL, NULL);
osThreadNew(task3, NULL, NULL);
osKernelStart(); // Start thread execution
for (;;) {}
}