I am trying to find documentation on the following function you are meant to implement when using the USB_Host_MSC library:
extern uint8_t USBHost_MSCApplication();
Now my guess is that you totally pass control of your application virtually entirely to the USBHost_Main() function by calling it repeatedly in the main control loop. And whatever you would have had in your main control loop you must now put in this function.
Am I right by this assumption. Or is it that only USB related functions need to be called from this function?
Is it called all the time or just when you have a valid device in the drive?
Or can I call the Read Write Functions from outside this function?
What is its exact purpose?
USBHost_MSCApplication Purpose ARM MikroC
Re: USBHost_MSCApplication Purpose ARM MikroC
Hi,
In this function you should put routines which will handle the operation with the MSC device, i.e. what the user wants to do with the MSC device. the default example lists the folder on the USB stick.
Regards,
Filip.
In this function you should put routines which will handle the operation with the MSC device, i.e. what the user wants to do with the MSC device. the default example lists the folder on the USB stick.
Regards,
Filip.
Re: USBHost_MSCApplication Purpose ARM MikroC
So is it true that I cant read/write sectors outside this function?
My code calls USB_Main repeatedly and sets up the interrupt as in the example. Other than that I would like to write an API that accesses the disk on sector by sector basis.
Are you saying I need to write some code to request a sector read or write only and have a USBHost_MSCApplication do the required work?
When is USBHost_MSCApplication called? Is it called repeatedly? Is it only called when a MSC device is present and when its ready to accept commands?
My code calls USB_Main repeatedly and sets up the interrupt as in the example. Other than that I would like to write an API that accesses the disk on sector by sector basis.
Are you saying I need to write some code to request a sector read or write only and have a USBHost_MSCApplication do the required work?
When is USBHost_MSCApplication called? Is it called repeatedly? Is it only called when a MSC device is present and when its ready to accept commands?
Re: USBHost_MSCApplication Purpose ARM MikroC
Any response from ME to sturoy71 last question?
Re: USBHost_MSCApplication Purpose ARM MikroC
Hi,
I believe I have answered you here :
http://www.mikroe.com/forum/viewtopic.p ... 29#p253329
Regards,
Filip.
I believe I have answered you here :
http://www.mikroe.com/forum/viewtopic.p ... 29#p253329
Regards,
Filip.