- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How do configure/code to make a thread into sleep mode and how do wake up from sleep mode to an active mode without affecting other threads? its not like cyclic.
the use case is,
(Considering GPIOAPP Example code as a reference)
During video streaming in UVC(active thread), the GPIO thread will be in a sleep state and whenever a GPIO Event(Button press) is received, the GPIO thread will wake up to blink the LED and again goes to a sleep state.
Or, is it possible on putting the GPIO thread in non-cyclic mode?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
There are two APIs "CyU3PThreadSuspend" and "CyU3PThreadResume". These APIs can help to force suspend and resume threads whenever required.
Please refer to FX3 API doc in the FX3 SDK for further details on the APIs.
Note that calling thread suspend on an already suspended thread may result in failures, similar is the case for resuming the thread.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
There are two APIs "CyU3PThreadSuspend" and "CyU3PThreadResume". These APIs can help to force suspend and resume threads whenever required.
Please refer to FX3 API doc in the FX3 SDK for further details on the APIs.
Note that calling thread suspend on an already suspended thread may result in failures, similar is the case for resuming the thread.
Best Regards,
AliAsgar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay will look into it.