From 823ddd46ec5307a1aa450041b55388eb46354cb4 Mon Sep 17 00:00:00 2001 From: james <1943357252@qq.com> Date: Tue, 6 Aug 2024 15:43:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9snake=E4=BC=98=E5=85=88=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- my_error/README.md | 4 ++++ my_pro/myproject.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/my_error/README.md b/my_error/README.md index f37f9b2..057bfc3 100644 --- a/my_error/README.md +++ b/my_error/README.md @@ -16,6 +16,10 @@ 调整好pin,timer,#define ***timer 总算可以了 调整好针脚等可以运行了,但一闪一闪的,估计是线程切换的原因? +注释掉红外线线程,也没有用,改了优先级终于可以了 +``` c +Snake_Thread = rt_thread_create("Snake_Thread", snake_entry, RT_NULL, THREAD_STACK_SIZE, 10, THREAD_TIMESLICE); +``` ### GET_PIN(F, 11) 的头文件 ``` c diff --git a/my_pro/myproject.c b/my_pro/myproject.c index 02c1fb2..b69179a 100644 --- a/my_pro/myproject.c +++ b/my_pro/myproject.c @@ -340,7 +340,7 @@ int ap3_init(void) } void snk_init(void) { - Snake_Thread = rt_thread_create("Snake_Thread", snake_entry, RT_NULL, THREAD_STACK_SIZE, THREAD_PRIORITY, THREAD_TIMESLICE); + Snake_Thread = rt_thread_create("Snake_Thread", snake_entry, RT_NULL, THREAD_STACK_SIZE, 10, THREAD_TIMESLICE); if (Snake_Thread != RT_NULL) {