Commit Graph

5 Commits

Author SHA1 Message Date
Markus Hitter 03e720d2ac pff.c/.h: add pf_unmount().
It's not mandatory to unmount cards, just make sure subsequent
card operations fail.
2015-07-05 23:32:48 +02:00
Markus Hitter 7762408d5c SD card, pff.c: silence a warning.
Let the preprocessor decide wether this piece of code is compiled
at all. Previous behaviour was to compile it unconditionally and
rely on the optimizer to remove it after that. Trusting the
optimizer is fine, but only if the code is warning-free in all cases.
2015-07-05 23:32:48 +02:00
Markus Hitter 9de0c65460 SD card: add the layer between hardware and Petit FatFs.
This is all the commands to read from and write to SPI,
initializing the card, read in blocks and so on. This should
make Petit FatFs actually usable.

So far read-only and no M-codes to let end users play with
this stuff.

The demonstration code was changed to list the SD card's
top level directory over and over again.
2015-07-05 23:32:48 +02:00
Markus Hitter 0a013d6e5e SD card: wrap Petit FatFs code in #ifdef SD.
No need to compile this when not needed and also make sure it's
nowhere used with SD card support disabled.
2015-07-05 23:32:48 +02:00
Markus Hitter 846d575aee SD card: add Petit FatFs to Teacup Firmware.
Some modifications to avoid file name conflicts with other parts and
make it compile. As the glue code to the hardware (spi.c/.h) is
still missing, there are a few warnings, of course.

Changes to this library are tracked in pff.c.
2015-07-05 23:32:48 +02:00