mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-17 05:32:55 +08:00
Some reverts and changes after discussion.
This commit is contained in:
parent
c31b95c916
commit
3816869fce
@ -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
|
||||
// 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)
|
||||
CFG_TUSB_MEM_SECTION struct
|
||||
// We will only execute control transfer one at a time.
|
||||
struct
|
||||
{
|
||||
tusb_control_request_t request TU_ATTR_ALIGNED(4);
|
||||
uint8_t* buffer;
|
||||
@ -509,7 +509,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr)
|
||||
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
|
||||
if (osal_queue_empty(_usbh_q)) return;
|
||||
#endif
|
||||
|
@ -74,6 +74,7 @@ TU_ATTR_ALWAYS_INLINE static inline osal_semaphore_t osal_semaphore_create(osal_
|
||||
#if configSUPPORT_STATIC_ALLOCATION == 1
|
||||
return xSemaphoreCreateBinaryStatic(semdef);
|
||||
#else
|
||||
(void)(semdef);
|
||||
return xSemaphoreCreateBinary();
|
||||
#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
|
||||
return xSemaphoreCreateMutexStatic(mdef);
|
||||
#else
|
||||
(void)(mdef);
|
||||
return xSemaphoreCreateMutex();
|
||||
#endif
|
||||
|
||||
@ -154,8 +156,9 @@ typedef struct
|
||||
uint16_t depth;
|
||||
uint16_t item_sz;
|
||||
void* buf;
|
||||
|
||||
#if configSUPPORT_STATIC_ALLOCATION == 1
|
||||
StaticQueue_t sq;
|
||||
#endif
|
||||
}osal_queue_def_t;
|
||||
|
||||
typedef QueueHandle_t osal_queue_t;
|
||||
|
@ -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 Suppress cast-align warning
|
||||
#pragma GCC diagnostic push
|
||||
if( prev == NULL ) break;
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wcast-align"
|
||||
ehci_qhd_t* qhd = (ehci_qhd_t*) list_next(prev);
|
||||
#pragma GCC diagnostic pop
|
||||
|
Loading…
x
Reference in New Issue
Block a user