Hi Matt, On May 9, 10:53 am, mattschinkel <[email protected]> wrote: > I still don't get it. How will the SD card device know what mode to > use? Don't you need to configure the sd card to use a different mode > such as mode 00? >
Sorry I am not better at communicating... So far I know, devices that support different SPI modes figure it out automatically. It purpose of spi_init() is to set registers inside the picmicro. In your case, you would do something like this: alias SD_FORCE_SPI_MODE_FUNCTION is spi_master_set_mode_11 include sd_card In my case, where all devices use the same mode, I would just call spi_init() once at the beginning of the program, and I would not define SD_FORCE_SPI_MODE_FUNCTION, and so when I included sd_card, your library will not mess with the mode at all. 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.
