[En-Nut-Discussion] MMC

Harald Kipp harald.kipp at egnite.de
Tue Oct 5 18:31:38 CEST 2004


The "r+" is one level above and translated into low level
flags in crt/fmode.c. Actually your driver should also work
on _open(), right? So it goes to parameter mode.

Yeah...well...file creation, directory deletion...etc. etc.

Many OSes use a table of functions, which are left empty
for devices, which do not support these.

My standard answer to this is: "Use ioctls". Changing directories
is something special. Its more like an environment setting than a
driver option. In fact, you can easily live without.

I'm open for discussion on any of these statements.

Harald

At 22:22 04.10.2004 +1300, you wrote:
>Hi,
>
>I understand that NUTOS allows parameters to be called when opening a
>device, e.g.
>
>NutRegisterDevice(&devMMC0, 0, 0);
>mmc = fopen("devMMC0:\myfile.dat", "r+");
>
>but in my open command in the NUTDEVICE I have defined:
>
>static NUTFILE *MMCFileOpen(NUTDEVICE * pDevice, CONST char *pName, int
>nMode, int nAccess)
>
>{
>//use AVR Studio and JTAGICE mkii to view the parameters while single
>stepping
>return(0);
>}
>
>The "devMMC0" becomes pDevice and myfile.dat goes to pName and "r+" goes
>nowhere.  (but I can see it in memory).
>
>In reading the PPP documentation
>(http://www.ethernut.de/en/nuttecnotes/ntn-1_ppp.html ) this makes sense,
>any ideas how this should be done without creating a non-standard way of
>doing this?
>
>Also for directories (making, changing, renaming and deleting directories)
>how should this be done to be consistent with NUTOS.
>
>(My operating System days are many years ago...)
>
>Doyglas
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.772 / Virus Database: 519 - Release Date: 1/10/2004
>
>
>_______________________________________________
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
>http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list