SD card: add a note about a possible performance optimisation.

This commit is contained in:
Markus Hitter 2015-06-14 18:13:40 +02:00
parent 30ce8eb1b4
commit bf1fa5f269
1 changed files with 5 additions and 0 deletions

View File

@ -188,6 +188,11 @@ DRESULT disk_readp(BYTE* buffer, DWORD sector, UINT offset, UINT count) {
/* Receive the requested part of the sector. */
do {
/**
Note that this isn't optimised for performance. The increment and
the dereferencing could be done while waiting for the SPIF bit
to become set in spi_rw(). See http://www.matuschek.net/atmega-spi/.
*/
*buffer++ = spi_rw(0xFF);
} while (--count);