Browse Source

feat: bsp: fit into the new thread context

Shell 8 months ago
parent
commit
81181e101f

+ 1 - 2
bsp/nuvoton/libraries/m2354/rtt_port/drv_usbhost.c

@@ -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_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);
         RT_ASSERT(result == RT_EOK);
 

+ 1 - 1
bsp/nuvoton/libraries/m460/rtt_port/drv_usbhost.c

@@ -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_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);
         RT_ASSERT(result == RT_EOK);
 

+ 1 - 1
bsp/nuvoton/libraries/m480/rtt_port/drv_usbhost.c

@@ -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_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);
         RT_ASSERT(result == RT_EOK);
 

+ 1 - 1
bsp/nuvoton/libraries/ma35/rtt_port/drv_usbhost.c

@@ -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_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);
         RT_ASSERT(result == RT_EOK);
 

+ 1 - 1
bsp/nuvoton/libraries/n9h30/rtt_port/drv_usbhost.c

@@ -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_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);
         RT_ASSERT(result == RT_EOK);
 

+ 1 - 1
bsp/nuvoton/libraries/nuc980/rtt_port/drv_usbhost.c

@@ -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_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);
         RT_ASSERT(result == RT_EOK);