/* register endpoint interrupt handler */ ep_indx = ((EP2_IN & 0x0F) << 1) + 1; // EP2_IN=0x82 ret = USBD_API->core->RegisterEpHandler(g_hUsb, ep_indx, EP2_hdlr, 0); |
usb_param.USB_Configure_Event = bwtest_ConfigureEvent; |
ErrorCode_t EP2_hdlr(USBD_HANDLE_T hUsb, void *data, uint32_t event) { switch (event) { case USB_EVT_IN: { g_u32_CptItEP2IN++; USBD_API->hw->WriteEP(g_hUsb, EP2_IN, (uint8_t*)g_tu8_TabEcp, 1024); break; } default: break; } return LPC_OK; } |