feat: bsp: fit into the new thread context

This commit is contained in:
Shell 2024-10-06 07:06:47 +00:00 committed by Meco Man
parent 645b3c6015
commit 81181e101f
6 changed files with 6 additions and 7 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);