Просмотр исходного кода

examples: Allow user to override EP0 size.

William D. Jones 6 лет назад
Родитель
Сommit
742f1f23c5

+ 2 - 1
examples/device/cdc_msc/src/tusb_config.h

@@ -68,8 +68,9 @@
 //--------------------------------------------------------------------
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------
-
+#ifndef CFG_TUD_ENDOINT0_SIZE
 #define CFG_TUD_ENDOINT0_SIZE    64
+#endif
 
 //------------- CLASS -------------//
 #define CFG_TUD_CDC              1

+ 3 - 1
examples/device/cdc_msc_hid_freertos/src/tusb_config.h

@@ -1,4 +1,4 @@
-/* 
+/*
  * The MIT License (MIT)
  *
  * Copyright (c) 2019 Ha Thach (tinyusb.org)
@@ -69,7 +69,9 @@
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------
 
+#ifndef CFG_TUD_ENDOINT0_SIZE
 #define CFG_TUD_ENDOINT0_SIZE    64
+#endif
 
 //------------- CLASS -------------//
 #define CFG_TUD_CDC              1

+ 3 - 1
examples/device/hid_composite/src/tusb_config.h

@@ -69,7 +69,9 @@
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------
 
-#define CFG_TUD_ENDOINT0_SIZE   64
+#ifndef CFG_TUD_ENDOINT0_SIZE
+#define CFG_TUD_ENDOINT0_SIZE    64
+#endif
 
 //------------- CLASS -------------//
 #define CFG_TUD_HID             1

+ 3 - 1
examples/device/hid_generic_inout/src/tusb_config.h

@@ -69,7 +69,9 @@
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------
 
-#define CFG_TUD_ENDOINT0_SIZE   64
+#ifndef CFG_TUD_ENDOINT0_SIZE
+#define CFG_TUD_ENDOINT0_SIZE    64
+#endif
 
 //------------- CLASS -------------//
 #define CFG_TUD_CDC             0

+ 3 - 1
examples/device/midi_test/src/tusb_config.h

@@ -69,7 +69,9 @@
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------
 
-#define CFG_TUD_ENDOINT0_SIZE     64
+#ifndef CFG_TUD_ENDOINT0_SIZE
+#define CFG_TUD_ENDOINT0_SIZE    64
+#endif
 
 //------------- CLASS -------------//
 #define CFG_TUD_CDC               0

+ 3 - 1
examples/device/msc_dual_lun/src/tusb_config.h

@@ -69,7 +69,9 @@
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------
 
-#define CFG_TUD_ENDOINT0_SIZE   64
+#ifndef CFG_TUD_ENDOINT0_SIZE
+#define CFG_TUD_ENDOINT0_SIZE    64
+#endif
 
 //------------- CLASS -------------//
 #define CFG_TUD_CDC             0

+ 3 - 1
examples/device/webusb_serial/src/tusb_config.h

@@ -69,7 +69,9 @@
 // DEVICE CONFIGURATION
 //--------------------------------------------------------------------
 
-#define CFG_TUD_ENDOINT0_SIZE     64
+#ifndef CFG_TUD_ENDOINT0_SIZE
+#define CFG_TUD_ENDOINT0_SIZE    64
+#endif
 
 //------------- CLASS -------------//
 #define CFG_TUD_CDC               1