46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
#pragma once
|
|
|
|
// TinyUSB configuration for RP2040 in HOST mode.
|
|
// This targets USB-serial adapters, including WCH CH34x (CH340/CH341).
|
|
|
|
#include "tusb_option.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
//------------- COMMON -------------
|
|
#define CFG_TUSB_MCU OPT_MCU_RP2040
|
|
#define CFG_TUSB_OS OPT_OS_PICO
|
|
|
|
// Use RP2040 USB controller as host (FS)
|
|
#define CFG_TUSB_RHPORT0_MODE (OPT_MODE_HOST | OPT_MODE_FULL_SPEED)
|
|
|
|
//------------- HOST -------------
|
|
#define CFG_TUH_ENABLED 1
|
|
|
|
// Small but sufficient for CDC-serial
|
|
#define CFG_TUH_ENUMERATION_BUFSIZE 256
|
|
|
|
// We only need CDC in this project
|
|
#define CFG_TUH_HID 0
|
|
#define CFG_TUH_MSC 0
|
|
#define CFG_TUH_VENDOR 0
|
|
|
|
// Enable 1 CDC interface
|
|
#define CFG_TUH_CDC 1
|
|
|
|
// CDC buffers (host side)
|
|
#define CFG_TUH_CDC_RX_BUFSIZE 512
|
|
#define CFG_TUH_CDC_TX_BUFSIZE 512
|
|
|
|
// USB-UART chip support under TinyUSB host CDC
|
|
#define CFG_TUH_CDC_CH34X 1
|
|
#define CFG_TUH_CDC_CP210X 0
|
|
#define CFG_TUH_CDC_FTDI 0
|
|
#define CFG_TUH_CDC_PL2303 0
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|