Sure, I'm attaching one to this post: (Please visit the site to view this file) This example extends standard MSC host demo. Yellow led indicates that board waits for the device to be inserted. Red led is toggled once drive is being written to. When green led goes on, the device can be removed. The code creates a text file on the USB drive and writes some data to it (partition type, contents of a root directory). You can re-insert device and the old file will be replaced with new one. If all you're looking for is how to setup and initialize USBX, you can disregard entire while (1) loop that occurs after ux_host_stack_hcd_register() call.
↧