<?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>topic Re: How to use IO_IOCTL_FIND_FIRST_FILE   AND  IO_IOCTL_FIND_NEXT_FILE to find files in a USB STICK in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600069#M16672</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. But I cannot use that because I cannot use an sgtl5000 card.&amp;nbsp;Now I am working with TWR-K65f180m .All I have is an SD card and an SDRAM. I need to write the audio file from the SDcard to the SDRAM and read it from it. My audio file size is 68KB . Is it possible to allocate a buffer to save this file??? . I mean is the file size a problem???.( WaveFile[686876];) . When I tried to save this file from USB directly to a buffer of size 686876 the code is not working. If this is wrong is there any other way to save it to a buffer. ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;OLIVIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2016 06:42:34 GMT</pubDate>
    <dc:creator>oliviachristyva</dc:creator>
    <dc:date>2016-09-13T06:42:34Z</dc:date>
    <item>
      <title>How to use IO_IOCTL_FIND_FIRST_FILE   AND  IO_IOCTL_FIND_NEXT_FILE to find files in a USB STICK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600066#M16669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain me how to use this&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;IO_IOCTL_FIND_FIRST_FILE and&amp;nbsp;&lt;SPAN&gt;IO_IOCTL_FIND_NEXT_FILE effectively to find files in a USB stick . The code I wrote with this is not working. This is the first time I am using this so I dont know how it works.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;while ((len = _io_mfs_dir_read(dir_ptr, buffer, 100))&amp;gt;0){&lt;BR /&gt; strcpy(USB_Files,buffer);&lt;BR /&gt; //printf(USB_Files);&lt;/P&gt;&lt;P&gt;//List all files and subdirectories in a directory.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; error_code = _io_ioctl(mfs_fd_ptr, IO_IOCTL_FIND_FIRST_FILE,&lt;BR /&gt; &amp;amp;search);&lt;BR /&gt; if (error_code != MQX_OK) {&lt;BR /&gt; return error_code;&lt;BR /&gt; printf("\n\rFile read unsuccessful");&lt;BR /&gt; }&lt;BR /&gt; else&lt;BR /&gt; printf("\r\nReading Files Successful");&lt;BR /&gt; error_code = _io_ioctl(mfs_fd_ptr, IO_IOCTL_FIND_NEXT_FILE,&lt;BR /&gt; &amp;amp;search_data);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; }&lt;BR /&gt; _io_mfs_dir_close(dir_ptr);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 09:28:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600066#M16669</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2016-09-08T09:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to use IO_IOCTL_FIND_FIRST_FILE   AND  IO_IOCTL_FIND_NEXT_FILE to find files in a USB STICK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600067#M16670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;I found the solution and its working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;int error_code = MFS_NO_ERROR;&lt;BR /&gt; MFS_SEARCH_DATA search_data;&lt;BR /&gt; MFS_SEARCH_PARAM search;&lt;BR /&gt; char filepath [6]= "*.*";&lt;BR /&gt; MQX_FILE_PTR fs_ptr ;&lt;/P&gt;&lt;P&gt;fs_ptr = _io_get_first_valid_fs();&lt;/P&gt;&lt;P&gt;search.ATTRIBUTE = MFS_SEARCH_ANY;&lt;BR /&gt; search.WILDCARD = filepath;&lt;BR /&gt; search.SEARCH_DATA_PTR = &amp;amp;search_data;&lt;/P&gt;&lt;P&gt;error_code = _io_ioctl(fs_ptr, IO_IOCTL_FIND_FIRST_FILE,(uint_32*)&amp;amp;search);&lt;BR /&gt; while (error_code == MFS_NO_ERROR)&lt;BR /&gt; {&lt;BR /&gt; printf ("%-12.12s %6lu %02lu-%02lu-%04lu %02lu:%02lu:%02lu\n",&lt;BR /&gt; search_data.NAME,&lt;BR /&gt; search_data.FILE_SIZE,&lt;BR /&gt; (uint_32)(search_data.DATE &amp;amp; MFS_MASK_MONTH) &amp;gt;&amp;gt;MFS_SHIFT_MONTH,&lt;BR /&gt; (uint_32)(search_data.DATE &amp;amp; MFS_MASK_DAY) &amp;gt;&amp;gt;MFS_SHIFT_DAY,&lt;BR /&gt; (uint_32)((search_data.DATE &amp;amp; MFS_MASK_YEAR) &amp;gt;&amp;gt;MFS_SHIFT_YEAR) + 1980,&lt;BR /&gt; (uint_32)(search_data.TIME &amp;amp; MFS_MASK_HOURS) &amp;gt;&amp;gt;MFS_SHIFT_HOURS,&lt;BR /&gt; (uint_32)(search_data.TIME &amp;amp; MFS_MASK_MINUTES) &amp;gt;&amp;gt;MFS_SHIFT_MINUTES,&lt;BR /&gt; (uint_32)(search_data.TIME &amp;amp; MFS_MASK_SECONDS) &amp;lt;&amp;lt; 1);&lt;BR /&gt; error_code = _io_ioctl(fs_ptr, IO_IOCTL_FIND_NEXT_FILE,(uint_32*)&amp;amp;search_data);&lt;BR /&gt; }&lt;BR /&gt; if( search_data.FILE_SIZE == 686876)&lt;BR /&gt; {&lt;BR /&gt; printf("\r\nFound Wave File : %-12.12s",search_data.NAME);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;This gives me the required file name I need from a USB Stick.Hope it will help someone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I need to read this wave file and save it to a buffer and pass it to the DMA buffer from which the audio goes to the DAC output . If anybody have ideas on this please help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Olivia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 08:46:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600067#M16670</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2016-09-09T08:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use IO_IOCTL_FIND_FIRST_FILE   AND  IO_IOCTL_FIND_NEXT_FILE to find files in a USB STICK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600068#M16671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Oliva:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your sharing.&lt;/P&gt;&lt;P&gt;Regarding the wav file, I suggest you take a look at the sai_dma_demo , it may be help.&lt;/P&gt;&lt;P&gt;C:\Freescale\Freescale_MQX_4_2\mqx\examples\sai_dma_demo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:05:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600068#M16671</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2016-09-13T06:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use IO_IOCTL_FIND_FIRST_FILE   AND  IO_IOCTL_FIND_NEXT_FILE to find files in a USB STICK</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600069#M16672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply. But I cannot use that because I cannot use an sgtl5000 card.&amp;nbsp;Now I am working with TWR-K65f180m .All I have is an SD card and an SDRAM. I need to write the audio file from the SDcard to the SDRAM and read it from it. My audio file size is 68KB . Is it possible to allocate a buffer to save this file??? . I mean is the file size a problem???.( WaveFile[686876];) . When I tried to save this file from USB directly to a buffer of size 686876 the code is not working. If this is wrong is there any other way to save it to a buffer. ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;OLIVIA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2016 06:42:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-use-IO-IOCTL-FIND-FIRST-FILE-AND-IO-IOCTL-FIND-NEXT-FILE/m-p/600069#M16672</guid>
      <dc:creator>oliviachristyva</dc:creator>
      <dc:date>2016-09-13T06:42:34Z</dc:date>
    </item>
  </channel>
</rss>

