Skip to content

Commit 34c5949

Browse files
committed
fix build with other ports
1 parent a07f9fb commit 34c5949

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/class/cdc/cdc_host.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
//--------------------------------------------------------------------+
4040
// ESP32 out-of-sync
4141
//--------------------------------------------------------------------+
42-
#if defined(ARDUINO_ARCH_ESP32) && !defined(PLATFORMIO) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 4, 5)
42+
#if defined(ARDUINO_ARCH_ESP32) && !defined(PLATFORMIO)
43+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 4, 5)
4344
typedef struct {
4445
uint8_t daddr;
4546
tusb_desc_interface_t desc;
@@ -148,7 +149,7 @@ TU_ATTR_ALWAYS_INLINE static inline
148149
bool tu_edpt_stream_peek(tu_edpt_stream_t* s, uint8_t* ch) {
149150
return tu_fifo_peek(&s->ff, ch);
150151
}
151-
152+
#endif
152153
#endif
153154

154155
#include "cdc_host.h"

src/class/hid/hid_host.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@
3737
#include "host/usbh_pvt.h"
3838

3939
// ESP32 out-of-sync
40-
#if defined(ARDUINO_ARCH_ESP32) && !defined(PLATFORMIO) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 4, 5)
40+
#if defined(ARDUINO_ARCH_ESP32) && !defined(PLATFORMIO)
41+
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(4, 4, 5)
4142
typedef struct {
4243
uint8_t daddr;
4344
tusb_desc_interface_t desc;
4445
} tuh_itf_info_t;
4546
#endif
47+
#endif
4648

4749
#include "hid_host.h"
4850

0 commit comments

Comments
 (0)