From 3538707316200c61fcfd0aa730045d15b1a49a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=90=E5=98=89=E5=85=AC=E5=8F=B8=E7=AC=94=E8=AE=B0?= =?UTF-8?q?=E6=9C=AC?= <421750142@qq.com> Date: Wed, 21 Sep 2022 13:45:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dexamples=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8B=E7=9A=84bug,=E7=BC=96=E8=AF=91=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.修复examples/stm32f030/user/main.c中 eos_task_start()函数调用时 参数不匹配的问题 2.修复examples/stm32f103/user/main.c中 eos_task_start()函数调用时 参数不匹配的问题,以及eos_timer_start()调用时参数不匹配的问题 3.修复examples/stm32f429/user/main.c中 eos_task_start()函数调用时 参数不匹配的问题 --- examples/stm32f030/mdk/EventOS-Nano.uvprojx | 17 ++--------------- examples/stm32f030/user/main.c | 6 +++--- .../stm32f103/mdk_ac5/eventos-nano.uvprojx | 17 ++--------------- examples/stm32f103/user/main.c | 8 ++++---- .../stm32f429/mdk_ac5/eventos-basic.uvprojx | 18 ++---------------- .../stm32h743/mdk_ac5/eventos-basic.uvprojx | 19 +++---------------- examples/stm32h743/user/main.c | 6 +++--- 7 files changed, 19 insertions(+), 72 deletions(-) diff --git a/examples/stm32f030/mdk/EventOS-Nano.uvprojx b/examples/stm32f030/mdk/EventOS-Nano.uvprojx index e797c8b..e4dbd4f 100644 --- a/examples/stm32f030/mdk/EventOS-Nano.uvprojx +++ b/examples/stm32f030/mdk/EventOS-Nano.uvprojx @@ -10,8 +10,7 @@ EventOS 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC - 0 + 5060422::V5.06 update 4 (build 422)::ARMCC STM32F030C8Tx @@ -184,8 +183,6 @@ 0 0 0 - 0 - 0 0 0 8 @@ -326,7 +323,6 @@ 0 1 1 - 0 0 3 3 @@ -352,7 +348,7 @@ 0 0 0 - 1 + 0 @@ -435,13 +431,4 @@ - - - - EventOS-Nano - 1 - - - - diff --git a/examples/stm32f030/user/main.c b/examples/stm32f030/user/main.c index 55394eb..97b98d1 100644 --- a/examples/stm32f030/user/main.c +++ b/examples/stm32f030/user/main.c @@ -27,10 +27,10 @@ int main(void) eos_init(stack_idle, sizeof(stack_idle)); // EventOS初始化 // 启动LED闪烁任务 - eos_task_start(&led, task_entry_led, 1, stack_led, sizeof(stack_led)); + eos_task_start(&led, (eos_func_t)task_entry_led, 1, stack_led, sizeof(stack_led),(void*)0); // 启动计数任务 - eos_task_start(&count, task_entry_count, 2, stack_count, sizeof(stack_count)); + eos_task_start(&count, (eos_func_t)task_entry_count, 2, stack_count, sizeof(stack_count),(void*)0); eos_run(); // EventOS启动 @@ -40,7 +40,7 @@ int main(void) uint8_t led_status = 0; static void task_entry_led(void) { - eos_task_start(&test_exit, task_entry_test_exit, 3, stack_test_exit, sizeof(stack_test_exit)); + eos_task_start(&test_exit, (eos_func_t)task_entry_test_exit, 3, stack_test_exit, sizeof(stack_test_exit),(void*)0); while (1) { led_status = 0; diff --git a/examples/stm32f103/mdk_ac5/eventos-nano.uvprojx b/examples/stm32f103/mdk_ac5/eventos-nano.uvprojx index c290c39..29053ac 100644 --- a/examples/stm32f103/mdk_ac5/eventos-nano.uvprojx +++ b/examples/stm32f103/mdk_ac5/eventos-nano.uvprojx @@ -10,8 +10,7 @@ EventOS 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC - 0 + 5060422::V5.06 update 4 (build 422)::ARMCC STM32F103RC @@ -184,8 +183,6 @@ 0 0 0 - 0 - 0 0 0 8 @@ -326,7 +323,6 @@ 0 1 1 - 0 0 3 3 @@ -352,7 +348,7 @@ 0 0 0 - 1 + 0 @@ -435,13 +431,4 @@ - - - - eventos-nano - 1 - - - - diff --git a/examples/stm32f103/user/main.c b/examples/stm32f103/user/main.c index 005f69f..b09ceb3 100644 --- a/examples/stm32f103/user/main.c +++ b/examples/stm32f103/user/main.c @@ -42,10 +42,10 @@ int main(void) eos_init(stack_idle, sizeof(stack_idle)); // EventOS初始化 // 启动LED闪烁任务 - eos_task_start(&led, task_entry_led, 2, stack_led, sizeof(stack_led)); + eos_task_start(&led, (eos_func_t)task_entry_led, 2, stack_led, sizeof(stack_led),(void*)0); // 启动计数任务 - eos_task_start(&count, task_entry_count, 3, stack_count, sizeof(stack_count)); + eos_task_start(&count, (eos_func_t)task_entry_count, 3, stack_count, sizeof(stack_count),(void*)0); eos_run(); // EventOS启动 @@ -57,10 +57,10 @@ uint8_t led_status = 0; static void task_entry_led(void) { - eos_task_start(&test_exit, task_entry_test_exit, 4, stack_test_exit, sizeof(stack_test_exit)); + eos_task_start(&test_exit, (eos_func_t)task_entry_test_exit, 4, stack_test_exit, sizeof(stack_test_exit),(void*)0); // 启动定时器 - timer_test.id = eos_timer_start(&timer, 10, false, timer_handler_10ms); + timer_test.id = eos_timer_start(&timer, 10, false, (eos_func_t)timer_handler_10ms,(void*)0); while (1) { led_status = 0; diff --git a/examples/stm32f429/mdk_ac5/eventos-basic.uvprojx b/examples/stm32f429/mdk_ac5/eventos-basic.uvprojx index 9e445f4..e5b7646 100644 --- a/examples/stm32f429/mdk_ac5/eventos-basic.uvprojx +++ b/examples/stm32f429/mdk_ac5/eventos-basic.uvprojx @@ -10,8 +10,7 @@ EventOS 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC - 0 + 5060422::V5.06 update 4 (build 422)::ARMCC STM32F429IGTx @@ -184,8 +183,6 @@ 0 0 1 - 0 - 0 1 0 8 @@ -326,7 +323,6 @@ 0 1 1 - 0 0 3 3 @@ -352,7 +348,7 @@ 0 0 0 - 1 + 0 @@ -450,14 +446,4 @@ - - - - eventos-nano - 0 - 1 - - - - diff --git a/examples/stm32h743/mdk_ac5/eventos-basic.uvprojx b/examples/stm32h743/mdk_ac5/eventos-basic.uvprojx index 5d82d01..16195f4 100644 --- a/examples/stm32h743/mdk_ac5/eventos-basic.uvprojx +++ b/examples/stm32h743/mdk_ac5/eventos-basic.uvprojx @@ -10,8 +10,7 @@ EventOS 0x4 ARM-ADS - 5060960::V5.06 update 7 (build 960)::.\ARMCC - 0 + 5060422::V5.06 update 4 (build 422)::ARMCC STM32H743XIHx @@ -184,8 +183,6 @@ 1 0 1 - 0 - 0 1 1 8 @@ -326,7 +323,6 @@ 0 1 1 - 0 0 3 3 @@ -337,7 +333,7 @@ 0 - STM32F429_439xx, + STM32H743xx, ..\APP;..\mcu;..\..\..\eventos;..\..\..\3rd @@ -352,7 +348,7 @@ 0 0 0 - 1 + 0 @@ -430,13 +426,4 @@ - - - - eventos-nano - 1 - - - - diff --git a/examples/stm32h743/user/main.c b/examples/stm32h743/user/main.c index 3e7a7ca..04fed45 100644 --- a/examples/stm32h743/user/main.c +++ b/examples/stm32h743/user/main.c @@ -27,10 +27,10 @@ int main(void) eos_init(stack_idle, sizeof(stack_idle)); // EventOS初始化 // 启动LED闪烁任务 - eos_task_start(&led, task_entry_led, 1, stack_led, sizeof(stack_led)); + eos_task_start(&led, (eos_func_t)task_entry_led, 1, stack_led, sizeof(stack_led),(void*)0); // 启动计数任务 - eos_task_start(&count, task_entry_count, 2, stack_count, sizeof(stack_count)); + eos_task_start(&count, (eos_func_t)task_entry_count, 2, stack_count, sizeof(stack_count),(void*)0); eos_run(); // EventOS启动 @@ -40,7 +40,7 @@ int main(void) uint8_t led_status = 0; static void task_entry_led(void) { - eos_task_start(&test_exit, task_entry_test_exit, 3, stack_test_exit, sizeof(stack_test_exit)); + eos_task_start(&test_exit, (eos_func_t)task_entry_test_exit, 3, stack_test_exit, sizeof(stack_test_exit),(void*)0); while (1) { led_status = 0; -- Gitee