Ajout vTaskUtil aux thread
This commit is contained in:
parent
fa2a323ede
commit
7639207df4
2 changed files with 19 additions and 4 deletions
|
@ -1441,9 +1441,11 @@ static void MX_GPIO_Init(void)
|
||||||
void f_GameMaster(void const * argument)
|
void f_GameMaster(void const * argument)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN 5 */
|
/* USER CODE BEGIN 5 */
|
||||||
|
TickType_t xLastWakeTime;
|
||||||
|
const TickType_t xPeriodeTache = 10;
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
osDelay(1);
|
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
|
||||||
}
|
}
|
||||||
/* USER CODE END 5 */
|
/* USER CODE END 5 */
|
||||||
}
|
}
|
||||||
|
@ -1458,10 +1460,12 @@ void f_GameMaster(void const * argument)
|
||||||
void f_Joueur_1(void const * argument)
|
void f_Joueur_1(void const * argument)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN f_Joueur_1 */
|
/* USER CODE BEGIN f_Joueur_1 */
|
||||||
|
TickType_t xLastWakeTime;
|
||||||
|
const TickType_t xPeriodeTache = 10;
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
osDelay(1);
|
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
|
||||||
}
|
}
|
||||||
/* USER CODE END f_Joueur_1 */
|
/* USER CODE END f_Joueur_1 */
|
||||||
}
|
}
|
||||||
|
@ -1476,10 +1480,12 @@ void f_Joueur_1(void const * argument)
|
||||||
void f_block_enemie(void const * argument)
|
void f_block_enemie(void const * argument)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN f_block_enemie */
|
/* USER CODE BEGIN f_block_enemie */
|
||||||
|
TickType_t xLastWakeTime;
|
||||||
|
const TickType_t xPeriodeTache = 10;
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
osDelay(1);
|
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
|
||||||
}
|
}
|
||||||
/* USER CODE END f_block_enemie */
|
/* USER CODE END f_block_enemie */
|
||||||
}
|
}
|
||||||
|
@ -1494,10 +1500,12 @@ void f_block_enemie(void const * argument)
|
||||||
void f_projectile(void const * argument)
|
void f_projectile(void const * argument)
|
||||||
{
|
{
|
||||||
/* USER CODE BEGIN f_projectile */
|
/* USER CODE BEGIN f_projectile */
|
||||||
|
TickType_t xLastWakeTime;
|
||||||
|
const TickType_t xPeriodeTache = 10;
|
||||||
/* Infinite loop */
|
/* Infinite loop */
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
osDelay(1);
|
vTaskDelayUntil( &xLastWakeTime, xPeriodeTache );
|
||||||
}
|
}
|
||||||
/* USER CODE END f_projectile */
|
/* USER CODE END f_projectile */
|
||||||
}
|
}
|
||||||
|
|
7
Space_Invader.code-workspace
Normal file
7
Space_Invader.code-workspace
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue