summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHardy Griech <[email protected]>2023-08-31 20:32:42 +0200
committerHardy Griech <[email protected]>2023-08-31 20:32:42 +0200
commit92025b00f0a7d7d0b45d8a2bcc3f3704dbe77733 (patch)
tree96576ca3f66270734b0a00593c9d1653419ddcc8
parent1dd9fa3f307e6f3a847619d587529ea17608c1a3 (diff)
code review: add NCM options in example config
-rw-r--r--examples/device/net_lwip_webserver/src/tusb_config.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/device/net_lwip_webserver/src/tusb_config.h b/examples/device/net_lwip_webserver/src/tusb_config.h
index fe72ecdfe..025c0b0bf 100644
--- a/examples/device/net_lwip_webserver/src/tusb_config.h
+++ b/examples/device/net_lwip_webserver/src/tusb_config.h
@@ -82,6 +82,16 @@
#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4)))
#endif
+// number of NCM transfer blocks for reception side (only valid if NCM is selected below)
+#ifndef CFG_TUD_NCM_OUT_NTB_N
+#define CFG_TUD_NCM_OUT_NTB_N 2
+#endif
+
+// number of NCM transfer blocks for transmission side (only valid if NCM is selected below)
+#ifndef CFG_TUD_NCM_IN_NTB_N
+#define CFG_TUD_NCM_IN_NTB_N 3
+#endif
+
//--------------------------------------------------------------------
// DEVICE CONFIGURATION
//--------------------------------------------------------------------
@@ -94,8 +104,8 @@
// Network class has 2 drivers: ECM/RNDIS and NCM.
// Only one of the drivers can be enabled
-#define CFG_TUD_ECM_RNDIS 1
-#define CFG_TUD_NCM (1-CFG_TUD_ECM_RNDIS)
+#define CFG_TUD_ECM_RNDIS 0
+#define CFG_TUD_NCM (1-CFG_TUD_ECM_RNDIS)
#ifdef __cplusplus
}