Some reverts and changes after discussion.

This commit is contained in:
pete-pjb 2022-12-02 10:00:19 +00:00
parent c31b95c916
commit 3816869fce
3 changed files with 9 additions and 5 deletions

View File

@ -246,8 +246,8 @@ static uint8_t _usbh_ctrl_buf[CFG_TUH_ENUMERATION_BUFSIZE];
// Control transfer: since most controller does not support multiple control transfer // Control transfer: since most controller does not support multiple control transfer
// on multiple devices concurrently. And control transfer is not used much except enumeration // on multiple devices concurrently. And control transfer is not used much except enumeration
// We will only execute control transfer one at a time.CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(4096) // We will only execute control transfer one at a time.
CFG_TUSB_MEM_SECTION struct struct
{ {
tusb_control_request_t request TU_ATTR_ALIGNED(4); tusb_control_request_t request TU_ATTR_ALIGNED(4);
uint8_t* buffer; uint8_t* buffer;
@ -509,7 +509,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr)
default: break; default: break;
} }
#if CFG_TUSB_OS != OPT_OS_NONE && CFG_TUSB_OS != OPT_OS_PICO && CFG_TUSB_OS != OPT_OS_FREERTOS #if CFG_TUSB_OS != OPT_OS_NONE && CFG_TUSB_OS != OPT_OS_PICO
// return if there is no more events, for application to run other background // return if there is no more events, for application to run other background
if (osal_queue_empty(_usbh_q)) return; if (osal_queue_empty(_usbh_q)) return;
#endif #endif

View File

@ -74,6 +74,7 @@ TU_ATTR_ALWAYS_INLINE static inline osal_semaphore_t osal_semaphore_create(osal_
#if configSUPPORT_STATIC_ALLOCATION == 1 #if configSUPPORT_STATIC_ALLOCATION == 1
return xSemaphoreCreateBinaryStatic(semdef); return xSemaphoreCreateBinaryStatic(semdef);
#else #else
(void)(semdef);
return xSemaphoreCreateBinary(); return xSemaphoreCreateBinary();
#endif #endif
} }
@ -125,6 +126,7 @@ TU_ATTR_ALWAYS_INLINE static inline osal_mutex_t osal_mutex_create(osal_mutex_de
#if configSUPPORT_STATIC_ALLOCATION == 1 #if configSUPPORT_STATIC_ALLOCATION == 1
return xSemaphoreCreateMutexStatic(mdef); return xSemaphoreCreateMutexStatic(mdef);
#else #else
(void)(mdef);
return xSemaphoreCreateMutex(); return xSemaphoreCreateMutex();
#endif #endif
@ -154,8 +156,9 @@ typedef struct
uint16_t depth; uint16_t depth;
uint16_t item_sz; uint16_t item_sz;
void* buf; void* buf;
#if configSUPPORT_STATIC_ALLOCATION == 1
StaticQueue_t sq; StaticQueue_t sq;
#endif
}osal_queue_def_t; }osal_queue_def_t;
typedef QueueHandle_t osal_queue_t; typedef QueueHandle_t osal_queue_t;

View File

@ -193,7 +193,8 @@ static void list_remove_qhd_by_addr(ehci_link_t* list_head, uint8_t dev_addr)
{ {
// TODO check type for ISO iTD and siTD // TODO check type for ISO iTD and siTD
// TODO Suppress cast-align warning // TODO Suppress cast-align warning
#pragma GCC diagnostic push if( prev == NULL ) break;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align" #pragma GCC diagnostic ignored "-Wcast-align"
ehci_qhd_t* qhd = (ehci_qhd_t*) list_next(prev); ehci_qhd_t* qhd = (ehci_qhd_t*) list_next(prev);
#pragma GCC diagnostic pop #pragma GCC diagnostic pop