Hi
I need someone to steer me in the right direction with a MIDI usb device I am developing using the USB API's on LPC51u68.
I have set up the USB API handlers with the code below and they return ret == LPC_OK.
/* register ISO OUT endpoint interrupt handler */
ep_index = ((MIDI_EP_OUT & 0x0F) << 1);
ret = USBD_API->core->RegisterEpHandler(hUsb, ep_index, MIDI_bulk_out_hdlr, in_buff);
ep_index = (((MIDI_EP_IN & 0x0F) << 1)+1);
ret = USBD_API->core->RegisterEpHandler(hUsb, ep_index, MIDI_bulk_in_hdlr, out_buff);
So my USB initializes OK but at the end after it initializes with PC , I get a URB_BULK_IN message to my EP from the host but it does not seem to fire the MIDI_bulk_in_hdlr() I setup?
I am trying to use MIDI_bulk_in_hdlr() to set CONNECTED=true so I can transmit out.
Currently I am sending messages out before the link is truly connected so it crashes the CPU sometimes when I do a
ret = USBD_API->hw->WriteEP at the wrong time.
Somehow I am missing something here about when and from what data to set my CONNECTED flag....
Thanks