FX3CX3 Thread创建

    xiaoxiao2021-12-14  60

    #ifdef My_Sensor_Thread void *ptr2 = NULL; ptr2 = CyU3PMemAlloc (UVC_APP_THREAD_STACK);//分配堆栈空间 /* Create the control request handling thread. */ retThrdCreate = CyU3PThreadCreate (&mpuThread, /* UVC Thread structure */ "MPU_Thread", /* Thread Id and name */ MPU_Thread_Entry, /* UVC Application EP0 Thread Entry function */ 0, /* No input parameter to thread */ ptr2, /* Pointer to the allocated thread stack */ UVC_APP_THREAD_STACK, /* UVC Application Thread stack size */ UVC_APP_THREAD_PRIORITY, /* UVC Application Thread priority */ UVC_APP_THREAD_PRIORITY, /* Threshold value for thread pre-emption. */ CYU3P_NO_TIME_SLICE, /* No time slice for the application thread */ CYU3P_AUTO_START /* Start the Thread immediately */ ); if (retThrdCreate != 0) { while(1); } #endif CyU3PThread mpuThread; void MPU_Thread_Entry ( uint32_t input) { CyU3PThreadSleep (3000); for (;;){ /////// /* Allow other ready threads to run. */ CyU3PThreadRelinquish (); } }
    转载请注明原文地址: https://ju.6miu.com/read-963750.html

    最新回复(0)