From 9515deab50b01adace871e257d8416dc10947951 Mon Sep 17 00:00:00 2001 From: Carsten Keller Date: Sun, 21 Apr 2024 18:34:05 +0200 Subject: [PATCH] Task wacht nur bei Nachricht auf. nachricht kommt alle 500ms --- Core/Src/LED.c | 3 +-- Core/Src/main.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Core/Src/LED.c b/Core/Src/LED.c index cfd3c7a..e36fb28 100644 --- a/Core/Src/LED.c +++ b/Core/Src/LED.c @@ -18,8 +18,7 @@ void LED(ULONG thread_input) while(true) { -// tx_thread_sleep(500U); - tx_queue_receive(&q_LED, &msg, 500UL); + tx_queue_receive(&q_LED, &msg, TX_WAIT_FOREVER); LL_GPIO_TogglePin(GPIOA, LL_GPIO_PIN_10); } diff --git a/Core/Src/main.c b/Core/Src/main.c index b8cbc5f..92eefac 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -173,7 +173,7 @@ void thread(ULONG thread_input) { while(true) { - tx_thread_sleep(1000U); + tx_thread_sleep(500U); tx_queue_send(&q_LED, &thread_input, TX_NO_WAIT); }