diff options
| author | hathach <[email protected]> | 2013-06-14 19:10:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-06-14 19:10:11 +0700 |
| commit | 77e0834f3464d44de9c0bc560f5db22cf58c2fa0 (patch) | |
| tree | bf7a768b076e4d4215b031b651332217832c9d30 /tinyusb | |
| parent | f219a9c77da1b8e29e119118d86b3499448478f6 (diff) | |
use dcd_pipe_control_read in endpoint_control_isr
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/device/dcd_lpc175x_6x.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/tinyusb/device/dcd_lpc175x_6x.c b/tinyusb/device/dcd_lpc175x_6x.c index cd5310284..50e7ebee8 100644 --- a/tinyusb/device/dcd_lpc175x_6x.c +++ b/tinyusb/device/dcd_lpc175x_6x.c @@ -114,20 +114,7 @@ void endpoint_control_isr(uint8_t coreid) { (void) sie_command_read(SIE_CMDCODE_ENDPOINT_SELECT_CLEAR_INTERRUPT+0, 1); // clear setup bit - // read endpoint - LPC_USB->USBCtrl = SLAVE_CONTROL_READ_ENABLE_MASK; // logical endpoint = 0 - while ((LPC_USB->USBRxPLen & SLAVE_RXPLEN_PACKET_READY_MASK) == 0) {} - - ASSERT_INT(8, LPC_USB->USBRxPLen & SLAVE_RXPLEN_PACKET_LENGTH_MASK, (void) 0); - - uint32_t *p_setup = (uint32_t*) &usbd_devices[0].setup_packet; - *p_setup = LPC_USB->USBRxData; - p_setup++; // increase by 4 ( sizeof(uint32_t) ) - *p_setup = LPC_USB->USBRxData; - - LPC_USB->USBCtrl = 0; - - // TODO setup received callback + dcd_pipe_control_read(0, &usbd_devices[0].setup_packet, 8); usbd_isr(0, TUSB_EVENT_SETUP_RECEIVED); }else { |
