(Solved)Help in using FAT32_FindFirst(__DIR *pD) function

General discussion on mikroC PRO for PIC32.
Post Reply
Author
Message
lasa@kiatronics
Posts: 55
Joined: 16 May 2012 01:14

(Solved)Help in using FAT32_FindFirst(__DIR *pD) function

#1 Post by lasa@kiatronics » 14 Jul 2016 05:16

Hi all,

I am trying to use FAT32_FindFirst(__DIR *pD) function in the FAT32 libarary to read .txt files, a folder will contain.

First question : Can I use above function to read the names of the files in a folder at all?

Second question: In an attempt to use the function I had the following piece of code after SD card has been initialized

FAT32_FindFirst(&FILE);

At the top I define FILE as follows

__DIR FILE;

When compiled mikroc gives me an error illegal pointer conversion.

Any suggestions?

Thanks
Last edited by lasa@kiatronics on 19 Jul 2016 05:54, edited 1 time in total.

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: Help in using FAT32_FindFirst(__DIR *pD) function

#2 Post by lana.arsic » 15 Jul 2016 15:43

Hi,

As regards your first question, yes you can read names of the files with FAT32_FindFirst().

As regards your second question, I'm sorry, I wasn't able to reproduce the same behavior.
Can you attach your whole project in a zip/rar archive, also which version of the FAT32 Library are you using?

Best regards,
Lana

lasa@kiatronics
Posts: 55
Joined: 16 May 2012 01:14

Re: Help in using FAT32_FindFirst(__DIR *pD) function

#3 Post by lasa@kiatronics » 17 Jul 2016 22:28

Hi,

Thanks for your reply. I have attached the file here. I have not commented err=FAT32_FindFirst(&FILE); in the project; hence it gives me an error. Once I've commented err=FAT32_FindFirst(&FILE); the project compiles fine.
I am using
FAT32 libaray with LFN support ver 3.1.0.0
MIkroC PRO for pic 32 compiler version is 3.6.0 with mE usb Dongle.

Thanks.
Attachments
V0_test.zip
(218.53 KiB) Downloaded 175 times

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: Help in using FAT32_FindFirst(__DIR *pD) function

#4 Post by lana.arsic » 18 Jul 2016 16:42

Hi,

I'm sending you in attachment your project which compiles without errors,
I have only replaced existing __Lib_FAT32.h with the same .h file but from
version 3.1.0.0.

Best regards,
Lana
Attachments
V0_test.zip
(369.51 KiB) Downloaded 269 times

lasa@kiatronics
Posts: 55
Joined: 16 May 2012 01:14

Re: Help in using FAT32_FindFirst(__DIR *pD) function

#5 Post by lasa@kiatronics » 19 Jul 2016 05:53

Hi Lana,

Now it is working fine. Thanks for the support.

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: (Solved)Help in using FAT32_FindFirst(__DIR *pD) funct

#6 Post by lana.arsic » 20 Jul 2016 13:05

Hi,

You're welcome, I'm glad that it was helpful.

Best regards,
Lana

Jude
Posts: 1
Joined: 12 May 2018 18:17

Re: (Solved)Help in using FAT32_FindFirst(__DIR *pD) funct

#7 Post by Jude » 12 May 2018 18:27

Sorry i'm having a bit of a hard time understanding how to use the FAT32_Findfirst and Findnext routine
Does __DIR *pD stand for my current director
and How do i use the information that comes from these routine

Masterok_78
Posts: 4
Joined: 07 Apr 2020 14:17

Re: (Solved)Help in using FAT32_FindFirst(__DIR *pD) funct

#8 Post by Masterok_78 » 07 Apr 2020 14:23

Jude wrote:
12 May 2018 18:27
Sorry i'm having a bit of a hard time understanding how to use the FAT32_Findfirst and Findnext routine
Does __DIR *pD stand for my current director
and How do i use the information that comes from these routine
Good day!

It's very actual theme !!!
Where the developers of Mikroe? Why the silence during some years? I think, so they do not pay attention for users.


Almost nobody use FAT32_Dir()
Is there any progress for getting the list files in simple operation, in memory registries, but NOT throw the USART ?!?!

Best regards.

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: (Solved)Help in using FAT32_FindFirst(__DIR *pD) function

#9 Post by stefan.filipovic » 08 Apr 2020 07:59

Hi,

Welcome to the MikroE forum!

Please refer to the following forum topic:
viewtopic.php?f=178&t=63656

Kind regards,
Stefan Filipović

Post Reply

Return to “mikroC PRO for PIC32 General”