31 lines
596 B
C
31 lines
596 B
C
|
#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;
|
||
|
for(;;){
|
||
|
log_v("demo task 1 [%d].",i++);
|
||
|
osDelay(1000);
|
||
|
}
|
||
|
}
|
||
|
void StartDemoTask2(void *argument){
|
||
|
uint8_t i=0;
|
||
|
for(;;){
|
||
|
log_v("demo task 2 [%d].",i++);
|
||
|
osDelay(1000);
|
||
|
}
|
||
|
}
|