> I've also seen you're using MSSP registers within enc28j60.jal library.

Yes, I do... and I dislike this. I would rather have a separate proc
to change spi mode. I do this in all libraries of mine that use SPI.
My libraries won't work with SPI software because of this.

-- put spi into mode 00
if ENC_ALWAYS_SET_SPI_MODE == TRUE then
   SSPCON_CKP = 0
   SSPSTAT_CKE = 1
end if

This is used when you have more then one SPI device on the same bus
that use different SPI modes. You should set ENC_ALWAYS_SET_SPI_MODE =
FALSE


> We could put all this "if defined" thing within spi_mssp_select.jal library

I guess I don't see the point. Why add another library? Sounds
confusing for the user.

We should also think for the future, if we ever use a different type
of microcontroller. It's not about MSSP, it's about the real names and
meanings of the variables. Other devices may also have CKE (clock edge
bit), but may not have SSPSTAT_CKE

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