[En-Nut-Discussion] MmCardMount

Stefan Profanter enut at s.profanter.me
Wed Aug 3 09:40:05 CEST 2011


Hi,
I don't know if it helps but here is an example how to read the MMC:
http://www.ethernut.de/nutwiki/Random_File_Access 

Stefan

-----Ursprüngliche Nachricht-----
Von: en-nut-discussion-bounces at egnite.de
[mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von Christoph
Urbanietz
Gesendet: Mittwoch, 3. August 2011 00:51
An: en-nut-discussion at egnite.de
Betreff: [En-Nut-Discussion] MmCardMount

Hello, this is my first try to use a mailinglist, so I hope I did everything
right?

I want to read sectors directly from the MMCard (I'm using the EIR).

I have a MMCard with one partition and i want to read block by block.

I tried so:


NUTFILE *alles;
NutRegisterDevice(&DEV_MMCARD, 0, 0);
if((alles = MmCardMount (&DEV_MMCARD, "0", _O_RDWR | _O_BINARY, 0)) ==
NUTFILE_EOF) puts("Error");

It shows Error. What am I doing wrong?

Later I want to read it block by block:
got =  MmCardBlockRead(alles, buffer, 1);

It should return 1 on sucess an read the next block (512 Bytes) ... am I
right? The first call should return the first block of this partition, the
second call the second block?

Thanks
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion




More information about the En-Nut-Discussion mailing list