[En-Nut-Discussion] PHAT example code ?
Jesper Hansen
jesperh at telia.com
Wed Jan 25 02:03:54 CET 2006
Does any testcode or examples for the PHAT filesystem and MMC
on the Nut 3.0d exist ?
I've spent hours here to try get it working without any luck.
The MMC seems to be okay, card status is alive, but I can't
get it to speak with PHAT.
The documentation is not very clear on this, even contradicting
in a few places.
Here's my simple test code snippet :
NutRegisterDevice(&devNplMmc0, 0, 0);
NutRegisterDevice(&devPhat0, 0, 0);
_open("MMC0:", _O_RDWR | _O_BINARY);
{
DIR *d = opendir("/");
if (d == NULL) {
printf("failed to open dir\n");
}else {
struct dirent* ent;
while ((ent = readdir(d)) != NULL) {
printf("%s\n",ent->d_name);
}
printf("done\n");
}
}
But this always fail to open the directory.
/Jesper
More information about the En-Nut-Discussion
mailing list