host msc example work well with rp2040 pio-usb
This commit is contained in:
@@ -54,13 +54,8 @@ int main(void)
|
||||
tuh_task();
|
||||
led_blinking_task();
|
||||
|
||||
#if CFG_TUH_CDC
|
||||
cdc_task();
|
||||
#endif
|
||||
|
||||
#if CFG_TUH_HID
|
||||
hid_app_task();
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -69,7 +64,6 @@ int main(void)
|
||||
//--------------------------------------------------------------------+
|
||||
// USB CDC
|
||||
//--------------------------------------------------------------------+
|
||||
#if CFG_TUH_CDC
|
||||
CFG_TUSB_MEM_SECTION static char serial_in_buffer[64] = { 0 };
|
||||
|
||||
// invoked ISR context
|
||||
@@ -90,8 +84,6 @@ void cdc_task(void)
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// TinyUSB Callbacks
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
|
||||
#include "tusb.h"
|
||||
|
||||
#if CFG_TUH_MSC
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -103,4 +101,3 @@ void tuh_msc_umount_cb(uint8_t dev_addr)
|
||||
// }
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,6 +34,12 @@
|
||||
// Board Specific Configuration
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
#if CFG_TUSB_MCU == OPT_MCU_RP2040
|
||||
// change to 1 if using pico-pio-usb as host controller for raspberry rp2040
|
||||
#define CFG_TUH_RPI_PIO_USB 0
|
||||
#define BOARD_TUH_RHPORT CFG_TUH_RPI_PIO_USB
|
||||
#endif
|
||||
|
||||
// RHPort number used for host can be defined by board.mk, default to port 0
|
||||
#ifndef BOARD_TUH_RHPORT
|
||||
#define BOARD_TUH_RHPORT 0
|
||||
|
||||
Reference in New Issue
Block a user