Browse Source

add backward compatible with warnings for CFG_TUD_NET

hathach 4 years ago
parent
commit
a8eea9f6a5
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/tusb_option.h

+ 6 - 1
src/tusb_option.h

@@ -266,7 +266,12 @@
 #endif
 
 #ifndef CFG_TUD_ECM_RNDIS
-  #define CFG_TUD_ECM_RNDIS   0
+  #ifdef CFG_TUD_NET
+    #warning "CFG_TUD_NET is renamed to CFG_TUD_ECM_RNDIS"
+    #define CFG_TUD_ECM_RNDIS   CFG_TUD_NET
+  #else
+    #define CFG_TUD_ECM_RNDIS   0
+  #endif
 #endif
 
 #ifndef CFG_TUD_NCM