USB HOST library

Post your requests and ideas for the mikroElektronika website & forums.
Post Reply
Author
Message
hooper
Posts: 143
Joined: 23 Oct 2009 08:51

USB HOST library

#1 Post by hooper » 28 Feb 2015 09:50

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?

hooper
Posts: 143
Joined: 23 Oct 2009 08:51

Re: USB HOST library

#2 Post by hooper » 28 Feb 2015 11:06

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.

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: USB HOST library

#3 Post by filip » 02 Mar 2015 16:46

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.

Post Reply

Return to “Website & Forums Wishlist”