hathach 7 лет назад
Родитель
Сommit
ff26c5c6b1
2 измененных файлов с 1 добавлено и 16 удалено
  1. 0 1
      src/device/usbd.c
  2. 1 15
      src/osal/osal_none.h

+ 0 - 1
src/device/usbd.c

@@ -475,7 +475,6 @@ void dcd_event_xfer_complete (uint8_t rhport, uint8_t ep_addr, uint32_t xferred_
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // Helper
 // Helper
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
-
 tusb_error_t usbd_open_edpt_pair(uint8_t rhport, tusb_desc_endpoint_t const* p_desc_ep, uint8_t xfer_type, uint8_t* ep_out, uint8_t* ep_in)
 tusb_error_t usbd_open_edpt_pair(uint8_t rhport, tusb_desc_endpoint_t const* p_desc_ep, uint8_t xfer_type, uint8_t* ep_out, uint8_t* ep_in)
 {
 {
   for(int i=0; i<2; i++)
   for(int i=0; i<2; i++)

+ 1 - 15
src/osal/osal_none.h

@@ -49,20 +49,9 @@
 
 
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 // TASK API
 // TASK API
-// NOTES: Each blocking OSAL_NONE services such as semaphore wait,
-// queue receive embedded return statement, therefore local variable
-// retain value before/after such services needed to declare as static
-// OSAL_TASK_LOOP
-// {
-//   OSAL_TASK_BEGIN
-//
-//   task body statements
-//
-//   OSAL_TASK_LOOP_ENG
-// }
+// Virtually do nothing in osal none
 //--------------------------------------------------------------------+
 //--------------------------------------------------------------------+
 #define OSAL_TASK_DEF(_name, _str, _func, _prio, _stack_sz)  osal_task_def_t _name;
 #define OSAL_TASK_DEF(_name, _str, _func, _prio, _stack_sz)  osal_task_def_t _name;
-
 typedef uint8_t osal_task_def_t;
 typedef uint8_t osal_task_def_t;
 
 
 static inline bool osal_task_create(osal_task_def_t* taskdef)
 static inline bool osal_task_create(osal_task_def_t* taskdef)
@@ -104,13 +93,10 @@ static inline tusb_error_t osal_semaphore_wait(osal_semaphore_t sem_hdl, uint32_
   while (true) {
   while (true) {
       while (sem_hdl->count == 0) {
       while (sem_hdl->count == 0) {
       }
       }
-      // tusb_hal_int_disable_all();
       if (sem_hdl->count == 0) {
       if (sem_hdl->count == 0) {
           sem_hdl->count--;
           sem_hdl->count--;
-          // tusb_hal_int_enable_all();
           break;
           break;
       }
       }
-      // tusb_hal_int_enable_all();
   }
   }
   return TUSB_ERROR_NONE;
   return TUSB_ERROR_NONE;
 }
 }