> I'm modifying your sd-card library so it's not tied to MSSP1. Currently,
> your lib internally uses "spi_master_hw" pseudo-var, I put a "if defined"
> logic such has:
>
> -- carrier used to access SD-Card (pseudo-var dealing with SPI)
> if !defined(spi_carrier) then
>    alias spi_carrier is spi_master_hw
> end if
>
> It now uses "spi_carrier", pointing to whatever needed (MSSP1, MSSP2, maybe
> even SPI software ?)

Please use spi_master instead of spi_carrier. When SPI is defined in
the sample, there can be aliases. For example:

...
include spi_master_hw
alias spi_master is spi_master_hw

I do this for other things as well:
alias serial_data is serial_hw_data

It makes it easy for the user to choose hw or software, etc.

> PS: I've also seen procedure _sd_read_512(), filling an array, index by
> index ([0], [1], ...), resulting in 512 lines in the body. There sure must
> be a reason, but I have to ask: why not using a loop ?

Because it's faster. There is a constant in the sample for extra speed
to use a non array loop. I think I made this a optional constant. Of
course this uses much more program memory space.

I believe this doubled the speed of hard disk transfers, I can't
remember the exact benifit. Maybe when I get around to writing a
tutorial, I'll add something on speed comparison.

Matt.

-- 
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.

Reply via email to