From cae19b8f567e3de9c02281cc2dae1477b2d46402 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 11 Jun 2013 17:12:44 +0700 Subject: [PATCH] fix bug with setup packet received (wrong increasement of pointer) --- tinyusb/device/dcd_lpc175x_6x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tinyusb/device/dcd_lpc175x_6x.c b/tinyusb/device/dcd_lpc175x_6x.c index 33da4be42..604a5d9fb 100644 --- a/tinyusb/device/dcd_lpc175x_6x.c +++ b/tinyusb/device/dcd_lpc175x_6x.c @@ -120,8 +120,11 @@ void endpoint_control_isr(uint8_t coreid) uint32_t *p_setup = (uint32_t*) &usbd_devices[0].setup_packet; *p_setup = LPC_USB->USBRxData; - p_setup += 4; + p_setup++; // increase by 4 ( sizeof(uint32_t) ) *p_setup = LPC_USB->USBRxData; + + LPC_USB->USBCtrl = 0; + // TODO setup received callback usbd_isr(0, TUSB_EVENT_SETUP_RECEIVED); }else