]> granicus.if.org Git - esp-idf/commit
spidriver: Display length errors correctly
authorMichael Kellner <mkellner@intlweb.com>
Thu, 13 Apr 2017 18:11:13 +0000 (11:11 -0700)
committerAngus Gratton <gus@projectgus.com>
Fri, 21 Apr 2017 01:03:07 +0000 (11:03 +1000)
commiteeb0aaa09e4e99bc12ffa17f5bf891d03d0b295c
tree7a3a3eaee71da941d0be8b7c281dc1fe773a5155
parentbf82b441ae8d598ebea01be24a90760f58d8f58e
spidriver: Display length errors correctly

SPI transfer length is bits, not bytes, so the error should indicate bits. Also, there are separate lengths for rx and
tx (confusingly named rxlength and length... if rxlength is 0, length is used). The code checks the tx length for the
rx, so it never validates rxlength.

Originally contributed as part of #511 https://github.com/espressif/esp-idf/pull/511
components/driver/spi_master.c