|

楼主 |
发表于 2020-11-12 15:31:59
|
显示全部楼层
- void  Thread_SerialRecv_entry (ULONG thread_input)
- {
-     UINT status;        
-     (void)thread_input;</p>
- status = tx_mutex_create(&mutex_serialrx,"mutex serialrx",TX_INHERIT);
-     if(TX_SUCCESS != status){
-
- }
-         
-     while(1)
-     {
-         status = tx_mutex_get(&mutex_serialrx,TX_WAIT_FOREVER);
-         if(status == TX_SUCCESS)
-        {
-             printf("Hello\r\n");
-        }
-        //tx_thread_sleep(1000);
-      }
- }
- /*
- 注释掉tx_thread_sleep(1000),程序会卡死在这个任务里。
- 取消注释tx_thread_sleep(1000);会一直printf,然而并没有tx_mutex_get互斥信号量。单片机使用的是h750。请问大家,是不是还有什么需要配置的地方?
- */
复制代码 |
|