Content originally posted in LPCWare by Idanba on Thu Feb 12 02:08:47 MST 2015
Hi Wouter,
Thanks a lot for the quick answer!
Another question I have is In case we'd like to be a mass storage DEVICE, using USB ROM API, Do we have to store the data received only on RAM?
From the example given it looks like *buff_adr will only hold the address we'd like to write into rather than data itself and this address, if I understand it right, must be accessible
for the USB DMA.
static void translate_wr(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)
{
*buff_adr = &g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) << 32)) + length];
}
where g_memDiskArea located on chip's SRAM.
Is there a way to use the USB ROM API provided but define the 'Storage' as external RAM or External flash? How would these write/read function should look like?
Thanks again!
Idan