Skip to content

Commit 3816869

Browse files
committed
Some reverts and changes after discussion.
1 parent c31b95c commit 3816869

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/host/usbh.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ static uint8_t _usbh_ctrl_buf[CFG_TUH_ENUMERATION_BUFSIZE];
246246

247247
// Control transfer: since most controller does not support multiple control transfer
248248
// on multiple devices concurrently. And control transfer is not used much except enumeration
249-
// We will only execute control transfer one at a time.CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(4096)
250-
CFG_TUSB_MEM_SECTION struct
249+
// We will only execute control transfer one at a time.
250+
struct
251251
{
252252
tusb_control_request_t request TU_ATTR_ALIGNED(4);
253253
uint8_t* buffer;
@@ -509,7 +509,7 @@ void tuh_task_ext(uint32_t timeout_ms, bool in_isr)
509509
default: break;
510510
}
511511

512-
#if CFG_TUSB_OS != OPT_OS_NONE && CFG_TUSB_OS != OPT_OS_PICO && CFG_TUSB_OS != OPT_OS_FREERTOS
512+
#if CFG_TUSB_OS != OPT_OS_NONE && CFG_TUSB_OS != OPT_OS_PICO
513513
// return if there is no more events, for application to run other background
514514
if (osal_queue_empty(_usbh_q)) return;
515515
#endif

src/osal/osal_freertos.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ TU_ATTR_ALWAYS_INLINE static inline osal_semaphore_t osal_semaphore_create(osal_
7474
#if configSUPPORT_STATIC_ALLOCATION == 1
7575
return xSemaphoreCreateBinaryStatic(semdef);
7676
#else
77+
(void)(semdef);
7778
return xSemaphoreCreateBinary();
7879
#endif
7980
}
@@ -125,6 +126,7 @@ TU_ATTR_ALWAYS_INLINE static inline osal_mutex_t osal_mutex_create(osal_mutex_de
125126
#if configSUPPORT_STATIC_ALLOCATION == 1
126127
return xSemaphoreCreateMutexStatic(mdef);
127128
#else
129+
(void)(mdef);
128130
return xSemaphoreCreateMutex();
129131
#endif
130132

@@ -154,8 +156,9 @@ typedef struct
154156
uint16_t depth;
155157
uint16_t item_sz;
156158
void* buf;
157-
159+
#if configSUPPORT_STATIC_ALLOCATION == 1
158160
StaticQueue_t sq;
161+
#endif
159162
}osal_queue_def_t;
160163

161164
typedef QueueHandle_t osal_queue_t;

src/portable/ehci/ehci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ static void list_remove_qhd_by_addr(ehci_link_t* list_head, uint8_t dev_addr)
193193
{
194194
// TODO check type for ISO iTD and siTD
195195
// TODO Suppress cast-align warning
196-
#pragma GCC diagnostic push
196+
if( prev == NULL ) break;
197+
#pragma GCC diagnostic push
197198
#pragma GCC diagnostic ignored "-Wcast-align"
198199
ehci_qhd_t* qhd = (ehci_qhd_t*) list_next(prev);
199200
#pragma GCC diagnostic pop

0 commit comments

Comments
 (0)