Greetings, On May 11, 10:29 am, Oliver Seitz <[email protected]> wrote: > I had been thinking about that part of the fat lib with PATA in mind, where > data is transferred in parallel and two bytes are read within six or seven > processor cycles. When SPI is used, things could be significantly sped up by > not using a generic "read and write" procedure, but a read-only-procedure. > The read-and-write-procedure is called, transfers the "write" data, and waits > until the "read" data is ready. As it is only dummy data that is transfered > while reading from the SD card, there would be no need to wait for the data > transfer. About eight processor cycles per byte are to be saved like that, > and those cycles could make up for the variable indexing. >
Yes, I was also thinking a generic read a bunch of bytes SPI routine might be called for. Not sure if the hardware master controller would freak out if we ignore checking for errors only at the end of the 512 bytes? And dare I say that _asm might be worth considering? > If the read-only-procedure would be inlined, even more cycles would be saved, > and that read-only-procedure would be very small, so that should not cost > much program data. > Sounds good. > The real problem IMO is, that the fat lib would have to make a difference on > what storage backend it is run then. > One way around this would be an alias that points to the function, and supply a generic default? William -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
