改snake优先级
This commit is contained in:
parent
28ebf7d2c1
commit
823ddd46ec
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue