This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

USB Endpoint call

Hi,

I modified USB memory example from Keil and I can enumerate. But I was trying to trace back how are the USB_Endpoint() functions called.
For example usbuser.c file has EndPoint definitions that look like this:

/*
 *  USB Endpoint 1 Event Callback
 *   Called automatically on USB Endpoint 1 Event
 *    Parameter:       event
 */

void USB_EndPoint1 (u32 event) {
        // BulkIn
}


/*
 *  USB Endpoint 2 Event Callback
 *   Called automatically on USB Endpoint 2 Event
 *    Parameter:       event
 */

void USB_EndPoint2 (u32 event) {
  USB_EP_Bulkout();     // Handle data that arrived on this Endpoint
}

I use Endpoint 1(IN) and Endpoint 2(OUT). But when I tried to search for these functions to see where they are called I came up empty.
Is this done in a interrupt routine someplace? IS this function name assembled someplace?
I assumed that as soon as the host sends data to the device it goes to the OUT endpoint and my device executes my function USB_EP_Bulkout().
But I couldn't find out where this UEB_EndPoint2() is called.

Any help is appreciated.
Thanks

Parents
  • Thanks Tsuneo,
    I should have said that I am using AT91SAM7X256,sorry for the confusion. IT came with my Keil compiler software.
    I think the code should for the most part be the same except few differences depending on the chip, am I right?
    I saw these directives but didn't really caught my eye what it was doing but now it makes sense. I'll have to spend some time trying to figure it out, you've explained most of it it seems like, now I just have to understand it.

    Thanks again.

Reply
  • Thanks Tsuneo,
    I should have said that I am using AT91SAM7X256,sorry for the confusion. IT came with my Keil compiler software.
    I think the code should for the most part be the same except few differences depending on the chip, am I right?
    I saw these directives but didn't really caught my eye what it was doing but now it makes sense. I'll have to spend some time trying to figure it out, you've explained most of it it seems like, now I just have to understand it.

    Thanks again.

Children
No data