]> granicus.if.org Git - esp-idf/commit
Merge branch 'bugfix/spi_multiple_cs_fix' into 'master'
authorAngus Gratton <angus@espressif.com>
Fri, 27 Jan 2017 00:33:16 +0000 (08:33 +0800)
committerAngus Gratton <angus@espressif.com>
Fri, 27 Jan 2017 00:33:16 +0000 (08:33 +0800)
commita4c76671c2d0ce7a443c197ba6e94c546cdbad4e
tree3bbccce280eb3ad8d3237f267a843529b8215f21
parent5e3b30da3a1666541b8e762190cb644ccbad811f
parent33500f256194bc65870323a2368563c4d3769e9e
Merge branch 'bugfix/spi_multiple_cs_fix' into 'master'

Add missing variable initialisation to make SPI work for multiple CS

Ref https://github.com/espressif/esp-idf/pull/277
From PR: "I am not especially familiar with this platform or with esp-idf -- so review with care.

The spi-master driver would not work for me when the number of devices on a bus exceeded 1 (caused device hang). I believe this is because cur_cs is not properly set (anywhere), and yet is used. This is likely just not noticed because 0 is presumably the correct value when there's only 1 device (and I'm guessing multi-device setup is not tested as thoroughly).

Simply setting cur_cs to the correct slot value resolves the problem and multiple devices on a single bus behave correctly in my test environment."

Looks like a small oversight on my side.

See merge request !468