mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-06 03:40:18 +00:00
add msc workaround for cxd56
This commit is contained in:
parent
fa030075c2
commit
f47e5402fa
@ -61,6 +61,7 @@ GDB = $(CROSS_COMPILE)gdb
|
||||
OBJCOPY = $(CROSS_COMPILE)objcopy
|
||||
SIZE = $(CROSS_COMPILE)size
|
||||
MKDIR = mkdir
|
||||
PYTHON = python
|
||||
|
||||
ifeq ($(CMDEXE),1)
|
||||
CP = copy
|
||||
|
@ -70,4 +70,5 @@ $(BUILD)/$(PROJECT).spk: $(MKSPK)
|
||||
|
||||
# flash
|
||||
flash: $(BUILD)/$(PROJECT).spk
|
||||
@$(TOP)/hw/mcu/sony/cxd56/tools/flash_writer.py -s -c $(SERIAL) -d -b 115200 -n $<
|
||||
@echo FLASH $<
|
||||
@$(PYTHON) $(TOP)/hw/mcu/sony/cxd56/tools/flash_writer.py -s -c $(SERIAL) -d -b 115200 -n $<
|
||||
|
@ -611,6 +611,17 @@ bool mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t event, uint32_t
|
||||
TU_ASSERT( send_csw(rhport, p_msc) );
|
||||
}
|
||||
}
|
||||
|
||||
#if TU_CHECK_MCU(CXD56)
|
||||
// WORKAROUND: cxd56 has its own nuttx usb stack which does not forward Set/ClearFeature(Endpoint) to DCD.
|
||||
// There is no way for us to know when EP is un-stall, therefore we will unconditionally un-stall here and
|
||||
// hope everything will work
|
||||
if ( usbd_edpt_stalled(rhport, p_msc->ep_in) )
|
||||
{
|
||||
usbd_edpt_clear_stall(rhport, p_msc->ep_in);
|
||||
send_csw(rhport, p_msc);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user