From d55f9ecef133e9650226c6313f4a2506060956ef Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 11 Jun 2013 16:13:50 +0700 Subject: [PATCH] get pass set address --- tinyusb/device/dcd_lpc175x_6x.c | 3 ++- tinyusb/device/usbd.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tinyusb/device/dcd_lpc175x_6x.c b/tinyusb/device/dcd_lpc175x_6x.c index 9d3ca62af..9235d216f 100644 --- a/tinyusb/device/dcd_lpc175x_6x.c +++ b/tinyusb/device/dcd_lpc175x_6x.c @@ -126,7 +126,8 @@ void endpoint_control_isr(uint8_t coreid) usbd_isr(0, TUSB_EVENT_SETUP_RECEIVED); }else { - //ASSERT(false, (void) 0); // not current supported + // RxPLen should be zero for zero-length status phase. Current not support any out control with data yet + ASSERT(LPC_USB->USBRxPLen == 0, (void) 0); } sie_command_write(SIE_CMDCODE_ENDPOINT_SELECT+0, 0, 0); sie_command_write(SIE_CMDCODE_BUFFER_CLEAR, 0, 0); diff --git a/tinyusb/device/usbd.c b/tinyusb/device/usbd.c index 01deb8660..92c9204e7 100644 --- a/tinyusb/device/usbd.c +++ b/tinyusb/device/usbd.c @@ -109,13 +109,13 @@ void usbd_setup_received(uint8_t coreid) case TUSB_REQUEST_SET_ADDRESS: p_device->address = (uint8_t) p_device->setup_packet.wValue; dcd_device_set_address(coreid, p_device->address); + dcd_pipe_control_write_zero_length(coreid); break; default: return; } -// dcd_pipe_control_write_zero_length(coreid); } //--------------------------------------------------------------------+