The function MSC_MemoryRead sends data from the onboard RAM
to the host. The number of bytes it sends is either the maximum
packet size or the number of bytes requested by the host, whichever
is lower. Modify this function to suit the application
requirements.
The function MSC_MemoryRead is part of the USB Function
Driver layer of the RL-USB Software Stack.
#include <mscuser.h>
void MSC_MemoryRead (void) {
U32 n;
…
// Call your function to read from the flash card.
Flash_MemoryRead(Offset, n, &Memory);
// Send the data through the endpoint.
USB_WriteEP(MSC_EP_IN, &Memory, n);
…
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.