Page 1 of 1

USB HOST library

Posted: 28 Feb 2015 09:50
by hooper
I am frustrated from ME's implementation of this library.
- why do I need to call the USBHost_Main() function endlessly?
- what is this function doing?
- who launches the USBHost_MSCApplication()?
- when is USBHost_MSCApplication lunched?
- Do i have to implement the actual code within this function or it is used to monitor the assistance of USB stick
and the code ( for example reading from or writing to a file) can be implemented and called from another function?

Re: USB HOST library

Posted: 28 Feb 2015 11:06
by hooper
hi,

just to make the whole story simple
I need to read/write to USB stick and identify when the stick is connected/disconnected.
All the headache concerning the call to USBHost_Main() is not clear.

Re: USB HOST library

Posted: 02 Mar 2015 16:46
by filip
Hi,
why do I need to call the USBHost_Main() function endlessly?
The library is designed in this way, so you must put this function into endless loop.
what is this function doing?
This function ensures that the communication with the device will be performed in the proper way,
i.e. it enumerates the device and processes the USB Host stack.
who launches the USBHost_MSCApplication()?
The USBHost_Main() launches this function.
when is USBHost_MSCApplication lunched?
This function is launched when enumeration of MS device and initialization of MS interface is finished.
Do i have to implement the actual code within this function or it is used to monitor the assistance of USB stick
Yes, you will need to implement it in your code, in the similar way that we done in the example.

Regards,
Filip.