New SdFat library (with and without DMA)

Please do not post requests
nicolas_soundforce
Posts: 22
Joined: Sat Jun 17, 2017 10:18 am

Re: New SdFat library (with and without DMA)

Post by nicolas_soundforce » Sun Aug 06, 2017 5:35 pm

I want to read 2 files at the same time. Can I just file.open() 2 files in parallel ? I am having problems at the moment and it doesn't work as expected.

stevestrong
Posts: 1840
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: New SdFat library (with and without DMA)

Post by stevestrong » Sun Aug 06, 2017 6:31 pm

Would you be able to help if you read what you have written? I dont owm any magic ball...

victor_pv
Posts: 1750
Joined: Mon Apr 27, 2015 12:12 pm

Re: New SdFat library (with and without DMA)

Post by victor_pv » Mon Aug 07, 2017 2:04 am

nicolas_soundforce wrote:
Sun Aug 06, 2017 5:35 pm
I want to read 2 files at the same time. Can I just file.open() 2 files in parallel ? I am having problems at the moment and it doesn't work as expected.
you need to declare 2 "file" objects, for example file1 and file2, then you can work on each separately:

Code: Select all

file1.open()
file2.open()
file2.read...
Check the sdfat library examples, I believe there are some that open more than 1 file.

nicolas_soundforce
Posts: 22
Joined: Sat Jun 17, 2017 10:18 am

Re: New SdFat library (with and without DMA)

Post by nicolas_soundforce » Tue Aug 08, 2017 9:02 pm

Thanks Victor, that worked without any problems.

stevestrong
Posts: 1840
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: New SdFat library (with and without DMA)

Post by stevestrong » Mon Sep 18, 2017 8:12 pm

Just fyi, I added support for F4 (SPI and SDIO) to SdFat library from Greiman: https://github.com/stevstrong/SdFat
PR is ongoing: https://github.com/greiman/SdFat/pull/69

Post Reply