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);
…
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.