From 451650fa32b245f2dc02c366b25fa802b75fbb1b Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 23 Feb 2021 23:09:48 +0700 Subject: [PATCH] move ehci and ohci to portable folder --- examples/host/cdc_msc_hid/Makefile | 4 ++-- examples/host/cdc_msc_hid/src/msc_app.c | 7 ------- src/{host => portable}/ehci/ehci.c | 4 ++-- src/{host => portable}/ehci/ehci.h | 2 -- src/{host => portable}/ohci/ohci.c | 8 +++++--- src/{host => portable}/ohci/ohci.h | 2 -- 6 files changed, 9 insertions(+), 18 deletions(-) rename src/{host => portable}/ehci/ehci.c (99%) rename src/{host => portable}/ehci/ehci.h (99%) rename src/{host => portable}/ohci/ohci.c (99%) rename src/{host => portable}/ohci/ohci.h (99%) diff --git a/examples/host/cdc_msc_hid/Makefile b/examples/host/cdc_msc_hid/Makefile index 3a0e94d7..6a2b4d90 100644 --- a/examples/host/cdc_msc_hid/Makefile +++ b/examples/host/cdc_msc_hid/Makefile @@ -19,8 +19,8 @@ SRC_C += \ src/host/hub.c \ src/host/usbh.c \ src/host/usbh_control.c \ - src/host/ehci/ehci.c \ - src/host/ohci/ohci.c \ + src/portable/ehci/ehci.c \ + src/portable/ohci/ohci.c \ src/portable/nxp/transdimension/hcd_transdimension.c \ src/portable/nxp/lpc17_40/hcd_lpc17_40.c diff --git a/examples/host/cdc_msc_hid/src/msc_app.c b/examples/host/cdc_msc_hid/src/msc_app.c index 623141ea..3a8ef3a0 100644 --- a/examples/host/cdc_msc_hid/src/msc_app.c +++ b/examples/host/cdc_msc_hid/src/msc_app.c @@ -73,13 +73,6 @@ void tuh_msc_mount_cb(uint8_t dev_addr) // return; // } // -// puts("---------------------------------------------------------------------"); -// puts("- MASSSTORAGE CLASS CLI IS A IMMATURE CODE. DISK-WRITING COMMANDS"); -// puts("- SUCH AS cp(COPY), mkdir(MAKE DIRECTORY) ARE POTENTIAL TO DAMAGE"); -// puts("- YOUR USB THUMBDRIVE. USING THOSE COMMANDS ARE AT YOUR OWN RISK."); -// puts("- THE AUTHOR HAS NO RESPONSIBILITY WITH YOUR DEVICE NOR ITS DATA"); -// puts("---------------------------------------------------------------------"); -// // f_chdrive(phy_disk); // change to newly mounted drive // f_chdir("/"); // root as current dir // diff --git a/src/host/ehci/ehci.c b/src/portable/ehci/ehci.c similarity index 99% rename from src/host/ehci/ehci.c rename to src/portable/ehci/ehci.c index 5626abcc..e2327fdc 100644 --- a/src/host/ehci/ehci.c +++ b/src/portable/ehci/ehci.c @@ -35,8 +35,8 @@ //--------------------------------------------------------------------+ #include "osal/osal.h" -#include "../hcd.h" -#include "../usbh_hcd.h" +#include "host/hcd.h" +#include "host/usbh_hcd.h" #include "ehci.h" //--------------------------------------------------------------------+ diff --git a/src/host/ehci/ehci.h b/src/portable/ehci/ehci.h similarity index 99% rename from src/host/ehci/ehci.h rename to src/portable/ehci/ehci.h index d8218a5f..212f605b 100644 --- a/src/host/ehci/ehci.h +++ b/src/portable/ehci/ehci.h @@ -33,8 +33,6 @@ #ifndef _TUSB_EHCI_H_ #define _TUSB_EHCI_H_ -#include "common/tusb_common.h" -#include "../hcd.h" /* Abbreviation * HC: Host Controller diff --git a/src/host/ohci/ohci.c b/src/portable/ohci/ohci.c similarity index 99% rename from src/host/ohci/ohci.c rename to src/portable/ohci/ohci.c index 44acebf7..ee294856 100644 --- a/src/host/ohci/ohci.c +++ b/src/portable/ohci/ohci.c @@ -26,14 +26,16 @@ #include -#if TUSB_OPT_HOST_ENABLED && (CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC40XX) +#if TUSB_OPT_HOST_ENABLED && \ + (CFG_TUSB_MCU == OPT_MCU_LPC175X_6X || CFG_TUSB_MCU == OPT_MCU_LPC40XX) + //--------------------------------------------------------------------+ // INCLUDE //--------------------------------------------------------------------+ #include "osal/osal.h" -#include "../hcd.h" -#include "../usbh_hcd.h" +#include "host/hcd.h" +#include "host/usbh_hcd.h" #include "ohci.h" // TODO remove diff --git a/src/host/ohci/ohci.h b/src/portable/ohci/ohci.h similarity index 99% rename from src/host/ohci/ohci.h rename to src/portable/ohci/ohci.h index 2915f8b0..7f9e55b2 100644 --- a/src/host/ohci/ohci.h +++ b/src/portable/ohci/ohci.h @@ -37,8 +37,6 @@ extern "C" { #endif -#include "common/tusb_common.h" - //--------------------------------------------------------------------+ // OHCI CONFIGURATION & CONSTANTS //--------------------------------------------------------------------+