mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
add hcd_ehci.h as interface for ehci port
This commit is contained in:
parent
2d15e11830
commit
1dd2cd43dd
@ -656,7 +656,7 @@ static bool enum_new_device(hcd_event_t* event)
|
||||
//------------- connected/disconnected directly with roothub -------------//
|
||||
if (dev0->hub_addr == 0)
|
||||
{
|
||||
// wait until device is stable
|
||||
// wait until device is stable TODO non blocking
|
||||
osal_task_delay(RESET_DELAY);
|
||||
|
||||
// device unplugged while delaying
|
||||
|
@ -37,6 +37,7 @@
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh_hcd.h"
|
||||
#include "hcd_ehci.h"
|
||||
#include "ehci.h"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
@ -49,10 +50,6 @@
|
||||
// Periodic frame list must be 4K alignment
|
||||
CFG_TUSB_MEM_SECTION TU_ATTR_ALIGNED(4096) static ehci_data_t ehci_data;
|
||||
|
||||
// EHCI portable
|
||||
uint32_t hcd_ehci_register_addr(uint8_t rhport);
|
||||
bool hcd_ehci_init (uint8_t rhport); // TODO move later
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// PROTOTYPE
|
||||
//--------------------------------------------------------------------+
|
||||
|
53
src/portable/ehci/hcd_ehci.h
Normal file
53
src/portable/ehci/hcd_ehci.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2021, Ha Thach (tinyusb.org)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* This file is part of the TinyUSB stack.
|
||||
*/
|
||||
|
||||
#ifndef _TUSB_HCD_EHCI_H_
|
||||
#define _TUSB_HCD_EHCI_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// API Implemented by HCD
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Get operational address i.e EHCI Command register
|
||||
uint32_t hcd_ehci_register_addr(uint8_t rhport);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// API Implemented by EHCI
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
// Initialize EHCI driver
|
||||
extern bool hcd_ehci_init (uint8_t rhport);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -43,6 +43,7 @@
|
||||
|
||||
#include "common/tusb_common.h"
|
||||
#include "common_transdimension.h"
|
||||
#include "portable/ehci/hcd_ehci.h"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO CONSTANT TYPEDEF
|
||||
@ -75,9 +76,6 @@ typedef struct
|
||||
};
|
||||
#endif
|
||||
|
||||
// TODO better prototype later
|
||||
extern bool hcd_ehci_init (uint8_t rhport); // from ehci.c
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Controller API
|
||||
//--------------------------------------------------------------------+
|
||||
|
Loading…
x
Reference in New Issue
Block a user