mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-20 04:21:29 +00:00
more clean up
This commit is contained in:
parent
a72d4e2462
commit
85dcb73774
@ -1 +1 @@
|
|||||||
Subproject commit aecced02e756f3a35805cacdd9be25976b6dd978
|
Subproject commit 6f76de3c0fb4679afc9f953cd4fec0637ebd2f15
|
@ -1071,8 +1071,7 @@ static bool process_get_descriptor(uint8_t rhport, tusb_control_request_t const
|
|||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// DCD Event Handler
|
// DCD Event Handler
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
TU_ATTR_FAST_FUNC
|
TU_ATTR_FAST_FUNC void dcd_event_handler(dcd_event_t const * event, bool in_isr)
|
||||||
void dcd_event_handler(dcd_event_t const * event, bool in_isr)
|
|
||||||
{
|
{
|
||||||
switch (event->event_id)
|
switch (event->event_id)
|
||||||
{
|
{
|
||||||
|
@ -1139,7 +1139,7 @@ enum {
|
|||||||
//ENUM_HUB_GET_STATUS_1,
|
//ENUM_HUB_GET_STATUS_1,
|
||||||
ENUM_HUB_CLEAR_RESET_1,
|
ENUM_HUB_CLEAR_RESET_1,
|
||||||
ENUM_ADDR0_DEVICE_DESC,
|
ENUM_ADDR0_DEVICE_DESC,
|
||||||
ENUM_RESET_2, // 2nd reset before set address
|
ENUM_RESET_2, // 2nd reset before set address (not used)
|
||||||
ENUM_HUB_GET_STATUS_2,
|
ENUM_HUB_GET_STATUS_2,
|
||||||
ENUM_HUB_CLEAR_RESET_2,
|
ENUM_HUB_CLEAR_RESET_2,
|
||||||
ENUM_SET_ADDR,
|
ENUM_SET_ADDR,
|
||||||
@ -1227,17 +1227,17 @@ static void process_enumeration(tuh_xfer_t* xfer)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if 0
|
||||||
case ENUM_RESET_2:
|
case ENUM_RESET_2:
|
||||||
|
// XXX note used by now, but may be needed for some devices !?
|
||||||
// Reset device again before Set Address
|
// Reset device again before Set Address
|
||||||
TU_LOG2("Port reset \r\n");
|
TU_LOG2("Port reset2 \r\n");
|
||||||
if (_dev0.hub_addr == 0)
|
if (_dev0.hub_addr == 0)
|
||||||
{
|
{
|
||||||
// connected directly to roothub
|
// connected directly to roothub
|
||||||
#if !CFG_TUH_RPI_PIO_USB // FIXME skip this reset for pio-usb
|
|
||||||
hcd_port_reset( _dev0.rhport );
|
hcd_port_reset( _dev0.rhport );
|
||||||
osal_task_delay(RESET_DELAY);
|
osal_task_delay(RESET_DELAY);
|
||||||
hcd_port_reset_end(_dev0.rhport);
|
hcd_port_reset_end(_dev0.rhport);
|
||||||
#endif
|
|
||||||
// TODO: fall through to SET ADDRESS, refactor later
|
// TODO: fall through to SET ADDRESS, refactor later
|
||||||
}
|
}
|
||||||
#if CFG_TUH_HUB
|
#if CFG_TUH_HUB
|
||||||
@ -1249,6 +1249,7 @@ static void process_enumeration(tuh_xfer_t* xfer)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
__attribute__((fallthrough));
|
__attribute__((fallthrough));
|
||||||
|
#endif
|
||||||
|
|
||||||
case ENUM_SET_ADDR:
|
case ENUM_SET_ADDR:
|
||||||
enum_request_set_addr();
|
enum_request_set_addr();
|
||||||
|
@ -135,6 +135,7 @@ void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr)
|
|||||||
{
|
{
|
||||||
(void) rhport;
|
(void) rhport;
|
||||||
endpoint_t *ep = pio_usb_device_get_endpoint_by_address(ep_addr);
|
endpoint_t *ep = pio_usb_device_get_endpoint_by_address(ep_addr);
|
||||||
|
ep->has_transfer = false;
|
||||||
ep->stalled = true;
|
ep->stalled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user