From: Angus Gratton Date: Fri, 27 Jan 2017 00:33:16 +0000 (+0800) Subject: Merge branch 'bugfix/spi_multiple_cs_fix' into 'master' X-Git-Tag: v2.0-rc2~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4c76671c2d0ce7a443c197ba6e94c546cdbad4e;p=esp-idf 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 --- a4c76671c2d0ce7a443c197ba6e94c546cdbad4e