Ajout vTaskUtil aux thread

This commit is contained in:
leo 2021-04-04 18:23:27 +02:00
parent fa2a323ede
commit 7639207df4
2 changed files with 19 additions and 4 deletions

View file

@ -1441,9 +1441,11 @@ static void MX_GPIO_Init(void)
void f_GameMaster(void const * argument)
{
/* USER CODE BEGIN 5 */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
/* Infinite loop */
for (;;) {
osDelay(1);
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
}
/* USER CODE END 5 */
}
@ -1458,10 +1460,12 @@ void f_GameMaster(void const * argument)
void f_Joueur_1(void const * argument)
{
/* USER CODE BEGIN f_Joueur_1 */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
/* Infinite loop */
for(;;)
{
osDelay(1);
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
}
/* USER CODE END f_Joueur_1 */
}
@ -1476,10 +1480,12 @@ void f_Joueur_1(void const * argument)
void f_block_enemie(void const * argument)
{
/* USER CODE BEGIN f_block_enemie */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
/* Infinite loop */
for(;;)
{
osDelay(1);
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
}
/* USER CODE END f_block_enemie */
}
@ -1494,10 +1500,12 @@ void f_block_enemie(void const * argument)
void f_projectile(void const * argument)
{
/* USER CODE BEGIN f_projectile */
TickType_t xLastWakeTime;
const TickType_t xPeriodeTache = 10;
/* Infinite loop */
for(;;)
{
osDelay(1);
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
}
/* USER CODE END f_projectile */
}

View file

@ -0,0 +1,7 @@
{
"folders": [
{
"path": "."
}
]
}