usb0 host on mcb1800 work with fullspeed mode.

use usbh_edpt_open() to correctly map ep2drv[]
This commit is contained in:
hathach
2020-05-19 00:55:43 +07:00
parent 905a80d1b2
commit 58cedf4c06
18 changed files with 115 additions and 66 deletions

View File

@@ -120,10 +120,27 @@ void hcd_port_reset(uint8_t rhport)
ehci_registers_t* regs = ehci_data.regs;
regs->portsc_bm.port_enabled = 0; // disable port before reset
regs->portsc_bm.port_reset = 1;
// regs->portsc_bm.port_enabled = 0; // disable port before reset
// regs->portsc_bm.port_reset = 1;
uint32_t portsc = regs->portsc;
portsc &= ~(EHCI_PORTSC_MASK_PORT_EANBLED);
portsc |= EHCI_PORTSC_MASK_PORT_RESET;
regs->portsc = portsc;
}
#if 0
void hcd_port_reset_end(uint8_t rhport)
{
(void) rhport;
ehci_registers_t* regs = ehci_data.regs;
regs->portsc_bm.port_reset = 0;
}
#endif
bool hcd_port_connect_status(uint8_t rhport)
{
(void) rhport;