Pages: [1]   Go Down
Author Topic: SPI library issues  (Read 883 times)
0 Members and 1 Guest are viewing this topic.
Boston, MA
Offline Offline
Jr. Member
Karma: 0
Posts: 83
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can I somehow help get SPI library issues addressed?  There is this bug which basically stops the SPI library from working with mode 3 (and probably other modes).

Another small bug is that if you just call begin() the library relies on the values of the SPSR and SPCR to be the default since it ORs bits without initializing the registers.

Also, a great feature would be the ability to switch between different SPI slaves in a standard way (similar to how "begin" is standard).  I would propose the addition of 2 member functions for APIs that use SPI ".pause()" (generally a no-op, but might turn off interrupt handlers for example) and ".resume()".

This is needed because (in my experience) all the config bits in SPCR and SPSR regs are not actually readable -- I just get 0x80 when I read SPCR for example.  This means that generic code to push and pop SPI register state like this does not work:
class SpiSaver
byte spcr,spsr;
SpiSaver() { spcr = SPCR; spsr = SPSR; }
~SpiSaver() { SPCR = spcr; SPSR = spsr; }

Logged Lightuino LED driver: 16 sources, 70 sinks, remote controlled.  Also high powered LED drivers.

Global Moderator
Offline Offline
Shannon Member
Karma: 209
Posts: 13018
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please reports your comments and suggestions on the Developer's List...

Pages: [1]   Go Up
Jump to: