This is an automated email from the ASF dual-hosted git repository. jerzy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
The following commit(s) were added to refs/heads/master by this push: new 78e41e688 tinyusb/cdc: Add fifo size configuration option 78e41e688 is described below commit 78e41e688dfc7af30d0a3f39ea3958b62101c48f Author: Jerzy Kasenberg <jerzy.kasenb...@codecoup.pl> AuthorDate: Mon May 9 11:50:42 2022 +0200 tinyusb/cdc: Add fifo size configuration option So far CDC RX/TX fifo size was matching endpoint size. Now it is possible to specify those in syscfg.yml. This can improve console logging. Default FIFO sizes remain unchanged. --- hw/usb/tinyusb/std_descriptors/include/tusb_config.h | 10 +++++++++- hw/usb/tinyusb/std_descriptors/syscfg.yml | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h index e78c752ad..f6f249830 100755 --- a/hw/usb/tinyusb/std_descriptors/include/tusb_config.h +++ b/hw/usb/tinyusb/std_descriptors/include/tusb_config.h @@ -105,9 +105,17 @@ extern "C" { /* Minimal number for alternative interfaces that is recognized by Windows as Bluetooth radio controller */ #define CFG_TUD_BTH_ISO_ALT_COUNT 2 -/* CDC FIFO size of TX and RX */ +#if MYNEWT_VAL(USBD_CDC_RX_BUFSIZE) +#define CFG_TUD_CDC_RX_BUFSIZE MYNEWT_VAL(USBD_CDC_RX_BUFSIZE) +#else #define CFG_TUD_CDC_RX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) +#endif + +#if MYNEWT_VAL(USBD_CDC_TX_BUFSIZE) +#define CFG_TUD_CDC_TX_BUFSIZE MYNEWT_VAL(USBD_CDC_TX_BUFSIZE) +#else #define CFG_TUD_CDC_TX_BUFSIZE (TUD_OPT_HIGH_SPEED ? 512 : 64) +#endif /* HID buffer size Should be sufficient to hold ID (if any) + Data */ #define CFG_TUD_HID_BUFSIZE 16 diff --git a/hw/usb/tinyusb/std_descriptors/syscfg.yml b/hw/usb/tinyusb/std_descriptors/syscfg.yml index 89f7b3653..54c39588b 100644 --- a/hw/usb/tinyusb/std_descriptors/syscfg.yml +++ b/hw/usb/tinyusb/std_descriptors/syscfg.yml @@ -91,7 +91,7 @@ syscfg.defs: description: CDC data out endpoint number value: USBD_CDC_DATA_IN_EP: - description: CDC data out endpoint number + description: CDC data in endpoint number value: USBD_CDC_DATA_EP_SIZE: description: CDC data endpoint size @@ -102,6 +102,12 @@ syscfg.defs: USBD_CDC_NOTIFY_EP_SIZE: description: CDC notify endpoint size value: + USBD_CDC_RX_BUFSIZE: + description: CDC endpoint OUT FIFO size + value: + USBD_CDC_TX_BUFSIZE: + description: CDC endpoint IN FIFO size + value: USBD_CDC_DESCRIPTOR_STRING: description: String for CDC interface