Motion_EC_Stm32_archived/App/Src/th_demo.c

40 lines
807 B
C
Raw Normal View History

2021-03-11 19:09:05 +08:00
/*
* @Description:
* @Date: 2021-03-09 18:19:26
* @LastEditors: CK.Zh
* @LastEditTime: 2021-03-10 15:07:01
* @FilePath: \NaviKit_EC_stm32\App\Src\th_demo.c
*/
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",
2021-03-11 19:09:05 +08:00
.priority = (osPriority_t) osPriorityLow2,
.stack_size = 128 * 8
2021-03-09 18:17:28 +08:00
};
const osThreadAttr_t DemoTask2_attributes = {
.name = "DemoTask2",
2021-03-11 19:09:05 +08:00
.priority = (osPriority_t) osPriorityLow1,
.stack_size = 128 * 8
2021-03-09 18:17:28 +08:00
};
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++);
2021-03-11 19:09:05 +08:00
osDelay(100);
2021-03-09 18:17:28 +08:00
}
}
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++);
2021-03-11 19:09:05 +08:00
osDelay(100);
2021-03-09 18:17:28 +08:00
}
}