[riot-commits] [RIOT-OS/RIOT] a12b87: cpu/stm32f1: spi_transfer_bytes proper counting.

Ludwig Ortmann ludwig.ortmann at fu-berlin.de
Wed Sep 3 10:34:49 CEST 2014


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: a12b87902727726a47132d8bd0ea77e9ed1baa28
      https://github.com/RIOT-OS/RIOT/commit/a12b87902727726a47132d8bd0ea77e9ed1baa28
  Author: Joakim Gebart <joakim at gebart.se>
  Date:   2014-09-02 (Tue, 02 Sep 2014)

  Changed paths:
    M cpu/stm32f1/periph/spi.c

  Log Message:
  -----------
  cpu/stm32f1: spi_transfer_bytes proper counting.

The transferred bytes were being counted more than once because of a +=
when calling spi_transfer_byte().

This patch should also handle errors from spi_transfer_byte() better
since it is now possible to detect errors _after_ the first byte has
been successfully sent.

Signed-off-by: Joakim Gebart <joakim at gebart.se>


  Commit: 21fc1bd7a6234d45e92cd251b1824171495fe61c
      https://github.com/RIOT-OS/RIOT/commit/21fc1bd7a6234d45e92cd251b1824171495fe61c
  Author: Joakim Gebart <joakim at gebart.se>
  Date:   2014-09-03 (Wed, 03 Sep 2014)

  Changed paths:
    M cpu/stm32f1/periph/spi.c

  Log Message:
  -----------
  cpu/stm32f1: Reduce scope of ret variable in spi_transfer_bytes.

Reduced scope to inside the while loop as per comments in RIOT-OS/RIOT#1630

Signed-off-by: Joakim Gebart <joakim at gebart.se>


  Commit: 9b361aa5b79a0751d9bec080287e3effd41dd86c
      https://github.com/RIOT-OS/RIOT/commit/9b361aa5b79a0751d9bec080287e3effd41dd86c
  Author: Ludwig Ortmann <ludwig.ortmann at fu-berlin.de>
  Date:   2014-09-03 (Wed, 03 Sep 2014)

  Changed paths:
    M cpu/stm32f1/periph/spi.c

  Log Message:
  -----------
  Merge pull request #1630 from gebart/stm32f1-spi-fix

cpu/stm32f1: spi_transfer_bytes proper counting.


Compare: https://github.com/RIOT-OS/RIOT/compare/4287188f2665...9b361aa5b79a


More information about the commits mailing list