> > -- in sample > > const byte SPI_SET_RATE = SPI_RATE_FOSC_4 > > const byte SPI_SET_MODE = SPI_MODE_11 > > spi_init() > > If constant, that could be done like this, like in other libs like > serial_hardware, where baudrate is (arguably) constant, and defined before > lib is included.
Thanks, this is what I was concentrating on, the constants suggested. > > -- in lib > > procedure spi_init() is > > [...] > > It really should be the same it is currently. Except if I miss something, > mode must still be forced in sd card for instance, so using current version > will avoid code duplication (register setting) I just put spi set mode "inline" for an example to show how the constant would help during compile. I do mean to leave set mode as a separate inline procedure, as well as putting a procedure for set mode in sd card. 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.
