Professional Documents
Culture Documents
Code TP2
Code TP2
h>
#include <cmsis_os2.h>
#include <stm32f4xx.h>
#include <Board_LED.h>
#include <rtx_os.h>
.name="aza",
//.attr_bits=1,
.cb_mem=NULL,
.stack_mem=0,
//.stack_size = sizeof(thread1_stk_1),
.priority=osPriorityNormal
};
*/
.priority=osPriorityAboveNormal};*/
.priority=osPriorityNormal};*/
{(void)argument;
LED_Initialize();
for (;;) {
LED_On(0);
osDelay(500U);
LED_Off(0);
osDelay(500U);
}}
(void)argument;
LED_Initialize();
for (;;) {
LED_On(1);
osDelay(500U);
LED_Off(1);
osDelay(500U);
}}
osKernelInitialize(); // mainID=osThreadGetId();
mainID=osThreadGetId();
osThreadSetPriority(mainID,osPriorityAboveNormal);
id1=osThreadNew(thread1,NULL,NULL);
//osThreadTerminate(id1);
osThreadTerminate(mainID);
osThreadSetPriority(id1,osPriorityAboveNormal);
osThreadSetPriority(id2,osPriorityAboveNormal);
osKernelStart();