<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックRead SDCard from USB</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Read-SDCard-from-USB/m-p/523806#M6442</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gdigiulio on Tue Sep 16 02:42:24 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would to connect my board LPC4088 to the PC via USB cable, in order to read the SD Card.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested the USB_MSC_RAM example and it works fine, I tested the SDMMC example and it works, but is there a project that merge both the example?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to do it myself, but I don't know the function to be wrapped here in order to read/write the SD Card:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;static void translate_rd(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)
{
*buff_adr = &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32))];
}

/* USB device mass storage class write callback routine */
static void translate_wr(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)
{
*buff_adr = &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32)) + length];
}

/* USB device mass storage class get write buffer callback routine */
static void translate_GetWrBuf(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)
{
*buff_adr = &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32))];
}

/* USB device mass storage class verify callback routine */
static ErrorCode_t translate_verify(uint32_t offset, uint8_t *src, uint32_t length, uint32_t hi_offset)
{
if (memcmp((void *) &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32))], src, length)) {
return ERR_FAILED;
}

return LPC_OK;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;How I should replace the function?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Giulio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:47:15 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:47:15Z</dc:date>
    <item>
      <title>Read SDCard from USB</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Read-SDCard-from-USB/m-p/523806#M6442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by gdigiulio on Tue Sep 16 02:42:24 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would to connect my board LPC4088 to the PC via USB cable, in order to read the SD Card.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tested the USB_MSC_RAM example and it works fine, I tested the SDMMC example and it works, but is there a project that merge both the example?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to do it myself, but I don't know the function to be wrapped here in order to read/write the SD Card:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;static void translate_rd(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)
{
*buff_adr = &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32))];
}

/* USB device mass storage class write callback routine */
static void translate_wr(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)
{
*buff_adr = &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32)) + length];
}

/* USB device mass storage class get write buffer callback routine */
static void translate_GetWrBuf(uint32_t offset, uint8_t * *buff_adr, uint32_t length, uint32_t hi_offset)
{
*buff_adr = &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32))];
}

/* USB device mass storage class verify callback routine */
static ErrorCode_t translate_verify(uint32_t offset, uint8_t *src, uint32_t length, uint32_t hi_offset)
{
if (memcmp((void *) &amp;amp;g_memDiskArea[(((uint64_t) offset) | (((uint64_t) hi_offset) &amp;lt;&amp;lt; 32))], src, length)) {
return ERR_FAILED;
}

return LPC_OK;
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;SPAN&gt;How I should replace the function?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Giulio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Read-SDCard-from-USB/m-p/523806#M6442</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: Read SDCard from USB</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Read-SDCard-from-USB/m-p/523807#M6443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mc on Fri Jan 23 11:40:55 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Example at below link can be helpful to implement code underneath these functions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Fblog%2Flpcxpresso-lpc11u14-usb-sd-card-exmple" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/blog/lpcxpresso-lpc11u14-usb-sd-card-exmple&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:47:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Read-SDCard-from-USB/m-p/523807#M6443</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:47:16Z</dc:date>
    </item>
  </channel>
</rss>

