Hi,
> I found this info about SPI, read page 24 & 25. selecting the "mode" > is quite simple: > > http://ww1.microchip.com/downloads/en/devicedoc/spi.pdf > > SPI Mode CKP CKE > 0,0 - 0 1 > 0,1 - 0 0 > 1,0 - 1 1 > 1,1 - 1 0 > > for my SD_CARD lib, I am using spi mode 0,0 > SSPSTAT_SMP = 0 -- sample bit, input data sampled at middle of data > output time > SSPSTAT_CKE = 0 -- clock edge select, data transmitted on falling > edge of sck > > so, we can just have the user select the CKP & CKE settings themself > and within the example files I will create, all modes should work with > no problem. > Do these mode have commonly used names ? If so, it could be useful and easier for users to provide procedures like spi_set_mode_indredible() or spi_set_mode_amazing(), ... This would help to hide complexity (if it is a good idea to hide complexity). Just some thoughts... Cheers, Seb --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
