改snake优先级

This commit is contained in:
james 2024-08-06 15:43:13 +08:00
parent 28ebf7d2c1
commit 823ddd46ec
2 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,10 @@
调整好pintimer#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

View File

@ -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)
{