bugfix SPI class, change API
authorDan White <dan@whiteaudio.com>
Tue, 17 Jul 2012 02:18:57 +0000 (21:18 -0500)
committerDan White <dan@whiteaudio.com>
Tue, 17 Jul 2012 02:18:57 +0000 (21:18 -0500)
commita1a6bf3f8973b769503f842f1c767728fce4032f
tree8fcf9faccf19332825f36abcbc765999c2d44212
parentdf3c7fb0b44223a3665f41dd9d95d2e095fa5073
bugfix SPI class, change API

For the weird SPI modes 1,3, SK must be in the opposite state than idle before
clocking in/out data.  The constructor uses a different data structure for
argument 'cs'.  A tuple of (mode, pinstate) is provided for each key, e.g.:
    {'_mask': (-1, 0xff),
     '_idle': (-1, 0xff),
     'dev1': (0, 0xf0)}
python-lib/usbio.py