Skip to content

Commit

Permalink
Increase buffers and improve USB descriptors
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed Nov 4, 2022
1 parent 8db03b4 commit 3e1672f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions tusb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
#define CFG_TUSB_RHPORT0_MODE OPT_MODE_DEVICE

#define CFG_TUD_CDC 2
#define CFG_TUD_CDC_RX_BUFSIZE 256
#define CFG_TUD_CDC_TX_BUFSIZE 256
#define CFG_TUD_CDC_RX_BUFSIZE 1024
#define CFG_TUD_CDC_TX_BUFSIZE 1024

void usbd_serial_init(void);

Expand Down
2 changes: 1 addition & 1 deletion uart-bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#define LED_PIN 25

#define BUFFER_SIZE 256
#define BUFFER_SIZE 2560

#define DEF_BIT_RATE 115200
#define DEF_STOP_BITS 1
Expand Down
13 changes: 8 additions & 5 deletions usb-descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@
#define USBD_PID 0x000A /* Raspberry Pi Pico SDK CDC */

#define USBD_DESC_LEN (TUD_CONFIG_DESC_LEN + TUD_CDC_DESC_LEN * CFG_TUD_CDC)
#define USBD_MAX_POWER_MA 250
#define USBD_MAX_POWER_MA 500

#define USBD_ITF_CDC_0 0
#define USBD_ITF_CDC_1 2
#define USBD_ITF_MAX 4

#define USBD_CDC_0_EP_CMD 0x81
#define USBD_CDC_1_EP_CMD 0x84
#define USBD_CDC_0_EP_OUT 0x02
#define USBD_CDC_1_EP_OUT 0x05
#define USBD_CDC_1_EP_CMD 0x83

#define USBD_CDC_0_EP_OUT 0x01
#define USBD_CDC_1_EP_OUT 0x03

#define USBD_CDC_0_EP_IN 0x82
#define USBD_CDC_1_EP_IN 0x85
#define USBD_CDC_1_EP_IN 0x84

#define USBD_CDC_CMD_MAX_SIZE 8
#define USBD_CDC_IN_OUT_MAX_SIZE 64

Expand Down

0 comments on commit 3e1672f

Please sign in to comment.