Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

How the USB sample work?

The Micrium offers a USB sample like this(Start.c): # include “USB.h”

void MainTask (void)

{

while(USB_IsConfigured() == 0){

USB_X_Delay(50); /*(1)*/

}

while(1) {

char c;

USB_Read(&c, 1); /*(2)*/

c++;

USB_Write(&c, 1);

}

}

}

I download the AN7000.rar file.It concludes USB_bsp.c,USB_bsp.h,USB_hw.c,SL811HS_reg.h.

Then,I don't know how the USB_X_Delay,USB_Read,USB_Write work.

I think i missed some code.But i cannot find them.

Will you give me a hand? Thank you.
No RepliesBe the first to reply