Motion_EC_Stm32_archived/App/Src/th_demo.c

33 lines
652 B
C
Raw Normal View History

2021-03-09 18:17:28 +08:00
#define LOG_TAG "TH-Demo"
#include <th_demo.h>
#include "main.h"
const osThreadAttr_t DemoTask1_attributes = {
.name = "DemoTask1",
.priority = (osPriority_t) osPriorityNormal,
.stack_size = 128 * 4
};
const osThreadAttr_t DemoTask2_attributes = {
.name = "DemoTask2",
.priority = (osPriority_t) osPriorityBelowNormal,
.stack_size = 128 * 4
};
void StartDemoTask1(void *argument){
uint8_t i=0;
2021-03-10 11:03:35 +08:00
log_v("Start Demo Task1");
2021-03-09 18:17:28 +08:00
for(;;){
log_v("demo task 1 [%d].",i++);
osDelay(1000);
}
}
void StartDemoTask2(void *argument){
uint8_t i=0;
2021-03-10 11:03:35 +08:00
log_v("Start Demo Task2");
2021-03-09 18:17:28 +08:00
for(;;){
log_v("demo task 2 [%d].",i++);
osDelay(1000);
}
}