fix bug with setup packet received (wrong increasement of pointer)

This commit is contained in:
hathach 2013-06-11 17:12:44 +07:00
parent 049a22f2cc
commit cae19b8f56
1 changed files with 4 additions and 1 deletions

View File

@ -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