feat: bsp: fit into the new thread context
This commit is contained in:
parent
645b3c6015
commit
81181e101f
|
@ -802,8 +802,7 @@ static rt_err_t usbhost_pm_suspend(const struct rt_device *device, rt_uint8_t mo
|
||||||
{
|
{
|
||||||
case PM_SLEEP_MODE_LIGHT:
|
case PM_SLEEP_MODE_LIGHT:
|
||||||
case PM_SLEEP_MODE_DEEP:
|
case PM_SLEEP_MODE_DEEP:
|
||||||
|
RT_SCHED_CTX(pNuUSBHDev->polling_thread).stat = RT_THREAD_READY;
|
||||||
pNuUSBHDev->polling_thread->stat = RT_THREAD_READY;
|
|
||||||
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
||||||
RT_ASSERT(result == RT_EOK);
|
RT_ASSERT(result == RT_EOK);
|
||||||
|
|
||||||
|
|
|
@ -819,7 +819,7 @@ static int usbhost_pm_suspend(const struct rt_device *device, rt_uint8_t mode)
|
||||||
case PM_SLEEP_MODE_LIGHT:
|
case PM_SLEEP_MODE_LIGHT:
|
||||||
case PM_SLEEP_MODE_DEEP:
|
case PM_SLEEP_MODE_DEEP:
|
||||||
|
|
||||||
pNuUSBHDev->polling_thread->stat = RT_THREAD_READY;
|
RT_SCHED_CTX(pNuUSBHDev->polling_thread).stat = RT_THREAD_READY;
|
||||||
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
||||||
RT_ASSERT(result == RT_EOK);
|
RT_ASSERT(result == RT_EOK);
|
||||||
|
|
||||||
|
|
|
@ -805,7 +805,7 @@ static rt_err_t usbhost_pm_suspend(const struct rt_device *device, rt_uint8_t mo
|
||||||
case PM_SLEEP_MODE_LIGHT:
|
case PM_SLEEP_MODE_LIGHT:
|
||||||
case PM_SLEEP_MODE_DEEP:
|
case PM_SLEEP_MODE_DEEP:
|
||||||
|
|
||||||
pNuUSBHDev->polling_thread->stat = RT_THREAD_READY;
|
RT_SCHED_CTX(pNuUSBHDev->polling_thread).stat = RT_THREAD_READY;
|
||||||
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
||||||
RT_ASSERT(result == RT_EOK);
|
RT_ASSERT(result == RT_EOK);
|
||||||
|
|
||||||
|
|
|
@ -845,7 +845,7 @@ static int usbhost_pm_suspend(const struct rt_device *device, rt_uint8_t mode)
|
||||||
case PM_SLEEP_MODE_LIGHT:
|
case PM_SLEEP_MODE_LIGHT:
|
||||||
case PM_SLEEP_MODE_DEEP:
|
case PM_SLEEP_MODE_DEEP:
|
||||||
|
|
||||||
pNuUSBHDev->polling_thread->stat = RT_THREAD_READY;
|
RT_SCHED_CTX(pNuUSBHDev->polling_thread).stat = RT_THREAD_READY;
|
||||||
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
||||||
RT_ASSERT(result == RT_EOK);
|
RT_ASSERT(result == RT_EOK);
|
||||||
|
|
||||||
|
|
|
@ -902,7 +902,7 @@ static int usbhost_pm_suspend(const struct rt_device *device, rt_uint8_t mode)
|
||||||
case PM_SLEEP_MODE_LIGHT:
|
case PM_SLEEP_MODE_LIGHT:
|
||||||
case PM_SLEEP_MODE_DEEP:
|
case PM_SLEEP_MODE_DEEP:
|
||||||
|
|
||||||
pNuUSBHDev->polling_thread->stat = RT_THREAD_READY;
|
RT_SCHED_CTX(pNuUSBHDev->polling_thread).stat = RT_THREAD_READY;
|
||||||
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
||||||
RT_ASSERT(result == RT_EOK);
|
RT_ASSERT(result == RT_EOK);
|
||||||
|
|
||||||
|
|
|
@ -902,7 +902,7 @@ static int usbhost_pm_suspend(const struct rt_device *device, rt_uint8_t mode)
|
||||||
case PM_SLEEP_MODE_LIGHT:
|
case PM_SLEEP_MODE_LIGHT:
|
||||||
case PM_SLEEP_MODE_DEEP:
|
case PM_SLEEP_MODE_DEEP:
|
||||||
|
|
||||||
pNuUSBHDev->polling_thread->stat = RT_THREAD_READY;
|
RT_SCHED_CTX(pNuUSBHDev->polling_thread).stat = RT_THREAD_READY;
|
||||||
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
result = rt_thread_suspend(pNuUSBHDev->polling_thread);
|
||||||
RT_ASSERT(result == RT_EOK);
|
RT_ASSERT(result == RT_EOK);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue