第二步,初始化
void MX_FREERTOS_Init(void) {
/* USER CODE BEGIN Init */
//事件组初始化
myEventGroup=xEventGroupCreate( );
xEventGroupClearBits(myEventGroup,0X000);
/* USER CODE END Init */
/* Create the thread(s) */
/* definition and creation of Task1 */
osThreadDef(Task1, StartDefaultTask, osPriorityNormal, 0, 128);
Task1Handle = osThreadCreate(osThread(Task1), NULL);
/* definition and creation of Task2 */
osThreadDef(Task2, StartTask02, osPriorityNormal, 0, 128);
Task2Handle = osThreadCreate(osThread(Task2), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */