rename and expose tuh_bus_info_get() to application
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
//--------------------------------------------------------------------+
|
||||
#include "common/tusb_common.h"
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
#include "portable/ehci/ehci_api.h"
|
||||
#include "ci_hs_type.h"
|
||||
|
||||
|
@@ -34,6 +34,7 @@
|
||||
#include "osal/osal.h"
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
#include "ehci_api.h"
|
||||
#include "ehci.h"
|
||||
|
||||
@@ -838,7 +839,7 @@ static void qhd_init(ehci_qhd_t *p_qhd, uint8_t dev_addr, tusb_desc_endpoint_t c
|
||||
}
|
||||
|
||||
tuh_bus_info_t bus_info;
|
||||
hcd_bus_info_get(dev_addr, &bus_info);
|
||||
tuh_bus_info_get(dev_addr, &bus_info);
|
||||
|
||||
uint8_t const xfer_type = ep_desc->bmAttributes.xfer;
|
||||
uint8_t const interval = ep_desc->bInterval;
|
||||
|
@@ -36,6 +36,7 @@ _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"");
|
||||
#endif
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
|
||||
#include "musb_type.h"
|
||||
|
||||
@@ -696,7 +697,7 @@ bool hcd_setup_send(uint8_t rhport, uint8_t dev_addr, uint8_t const setup_packet
|
||||
_hcd.pipe0.remaining = 0;
|
||||
|
||||
tuh_bus_info_t bus_info;
|
||||
hcd_bus_info_get(dev_addr, &bus_info);
|
||||
tuh_bus_info_get(dev_addr, &bus_info);
|
||||
switch (bus_info.speed) {
|
||||
default: return false;
|
||||
case TUSB_SPEED_LOW: USB0->TYPE0 = USB_TYPE0_SPEED_LOW; break;
|
||||
@@ -745,7 +746,7 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const
|
||||
|
||||
uint8_t pipe_type = 0;
|
||||
tuh_bus_info_t bus_info;
|
||||
hcd_bus_info_get(dev_addr, &bus_info);
|
||||
tuh_bus_info_get(dev_addr, &bus_info);
|
||||
switch (bus_info.speed) {
|
||||
default: return false;
|
||||
case TUSB_SPEED_LOW: pipe_type |= USB_TXTYPE1_SPEED_LOW; break;
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#endif
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "chip.h"
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
|
||||
void hcd_int_enable(uint8_t rhport)
|
||||
{
|
||||
|
@@ -38,6 +38,7 @@
|
||||
#include "osal/osal.h"
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
#include "ohci.h"
|
||||
|
||||
// TODO remove
|
||||
@@ -329,7 +330,7 @@ static void ed_init(ohci_ed_t *p_ed, uint8_t dev_addr, uint16_t ep_size, uint8_t
|
||||
}
|
||||
|
||||
tuh_bus_info_t bus_info;
|
||||
hcd_bus_info_get(dev_addr, &bus_info);
|
||||
tuh_bus_info_get(dev_addr, &bus_info);
|
||||
|
||||
p_ed->dev_addr = dev_addr;
|
||||
p_ed->ep_number = ep_addr & 0x0F;
|
||||
|
@@ -115,7 +115,7 @@ void hcd_int_disable(uint8_t rhport) {
|
||||
|
||||
bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const *desc_ep) {
|
||||
tuh_bus_info_t bus_info;
|
||||
hcd_bus_info_get(dev_addr, &bus_info);
|
||||
tuh_bus_info_get(dev_addr, &bus_info);
|
||||
bool const need_pre = (bus_info.hub_addr && bus_info.speed == TUSB_SPEED_LOW);
|
||||
|
||||
uint8_t const pio_rhport = RHPORT_PIO(rhport);
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#if CFG_TUH_ENABLED && defined(TUP_USBIP_RUSB2)
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
#include "rusb2_type.h"
|
||||
|
||||
#if TU_CHECK_MCU(OPT_MCU_RX63X, OPT_MCU_RX65X, OPT_MCU_RX72N)
|
||||
@@ -663,7 +664,7 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_endpoint_t const
|
||||
if (0 == epn) {
|
||||
rusb->DCPCTR = RUSB2_PIPE_CTR_PID_NAK;
|
||||
tuh_bus_info_t bus_info;
|
||||
hcd_bus_info_get(dev_addr, &bus_info);
|
||||
tuh_bus_info_get(dev_addr, &bus_info);
|
||||
uint16_t volatile *devadd = (uint16_t volatile *)(uintptr_t) &rusb->DEVADD[0];
|
||||
devadd += dev_addr;
|
||||
while (rusb->DCPCTR_b.PBUSY) {}
|
||||
|
@@ -36,6 +36,7 @@
|
||||
|
||||
#if CFG_TUH_ENABLED
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
#endif
|
||||
|
||||
#include "dwc2_common.h"
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#define DWC2_DEBUG 2
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
#include "dwc2_common.h"
|
||||
|
||||
// Max number of endpoints application can open, can be larger than DWC2_CHANNEL_COUNT_MAX
|
||||
@@ -476,7 +477,7 @@ bool hcd_edpt_open(uint8_t rhport, uint8_t dev_addr, const tusb_desc_endpoint_t*
|
||||
const tusb_speed_t rh_speed = hprt_speed_get(dwc2);
|
||||
|
||||
tuh_bus_info_t bus_info;
|
||||
hcd_bus_info_get(dev_addr, &bus_info);
|
||||
tuh_bus_info_get(dev_addr, &bus_info);
|
||||
|
||||
// find a free endpoint
|
||||
const uint8_t ep_id = edpt_alloc();
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#if CFG_TUH_ENABLED && CFG_TUSB_MCU == OPT_MCU_NONE
|
||||
|
||||
#include "host/hcd.h"
|
||||
#include "host/usbh.h"
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Controller API
|
||||
|
Reference in New Issue
Block a user