[riot-commits] [RIOT-OS/RIOT] 9e5f7b: drivers/periph_spi: make spi_acquire() return void

Francisco noreply at github.com
Thu Sep 2 08:51:09 CEST 2021


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 9e5f7b67975d1352ed9fcaf401f41a44c4e1f946
      https://github.com/RIOT-OS/RIOT/commit/9e5f7b67975d1352ed9fcaf401f41a44c4e1f946
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2021-08-06 (Fri, 06 Aug 2021)

  Changed paths:
    M drivers/include/periph/spi.h

  Log Message:
  -----------
  drivers/periph_spi: make spi_acquire() return void

There is no way to properly handle incorrect SPI parameters at run time, so
just having an assertion blow up is the better choice here.

As most instances of `spi_acquire()` don't check the return value anyway, this
will improve debugging experience quite a bit. Some implementation of
spi_acquire() don't even check parameters anyway.


  Commit: 7aab4786781250e2abc53fa743fde96c43d7925d
      https://github.com/RIOT-OS/RIOT/commit/7aab4786781250e2abc53fa743fde96c43d7925d
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2021-08-06 (Fri, 06 Aug 2021)

  Changed paths:
    M drivers/include/soft_spi.h
    M drivers/soft_spi/soft_spi.c

  Log Message:
  -----------
  drivers/soft_spi: update API to match periph_spi


  Commit: f04b5226018a6fa6d9502d45b52d1054c6323390
      https://github.com/RIOT-OS/RIOT/commit/f04b5226018a6fa6d9502d45b52d1054c6323390
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M cpu/atmega_common/periph/spi.c
    M cpu/atxmega/periph/spi.c
    M cpu/cc2538/periph/spi.c
    M cpu/efm32/periph/spi.c
    M cpu/esp_common/periph/spi.c
    M cpu/fe310/periph/spi.c
    M cpu/kinetis/periph/spi.c
    M cpu/lm4f120/periph/spi.c
    M cpu/lpc23xx/periph/spi.c
    M cpu/msp430fxyz/periph/spi.c
    M cpu/native/periph/spidev_linux.c
    M cpu/nrf51/periph/spi.c
    M cpu/nrf52/periph/spi.c
    M cpu/qn908x/periph/spi.c
    M cpu/sam0_common/periph/spi.c
    M cpu/sam3/periph/spi.c
    M cpu/stm32/periph/spi.c

  Log Message:
  -----------
  cpu/periph_spi: update implementations to new API

Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.


  Commit: 732cbd969c540e134c3e458adb76c34aeb3d1f21
      https://github.com/RIOT-OS/RIOT/commit/732cbd969c540e134c3e458adb76c34aeb3d1f21
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M drivers/at25xxx/at25xxx.c
    M drivers/at86rf2xx/at86rf2xx_netdev.c
    M drivers/ata8520e/ata8520e.c
    M drivers/bmx280/bmx280.c
    M drivers/cc110x/cc110x.c
    M drivers/cc110x/cc110x_calibration.c
    M drivers/cc110x/cc110x_communication.c
    M drivers/cc110x/cc110x_netdev.c
    M drivers/cc110x/cc110x_rx_tx.c
    M drivers/cc110x/include/cc110x_communication.h
    M drivers/kw2xrf/kw2xrf_spi.c
    M drivers/lis2dh12/lis2dh12.c
    M drivers/nrf24l01p/nrf24l01p.c
    M drivers/nrf24l01p_ng/include/nrf24l01p_ng_communication.h
    M drivers/nrf24l01p_ng/nrf24l01p_ng_communication.c
    M drivers/nrf24l01p_ng/nrf24l01p_ng_netdev.c
    M tests/driver_cc110x/sc_cc110x.c

  Log Message:
  -----------
  drivers: update to new periph_spi API


  Commit: 198046e167f5617f46c13b00fc8e2371abe814b1
      https://github.com/RIOT-OS/RIOT/commit/198046e167f5617f46c13b00fc8e2371abe814b1
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M tests/periph_spi/main.c

  Log Message:
  -----------
  tests/perpih_spi: update to new API


  Commit: 2efc50be97b4b63ae7a51a6e273eb4ebbb721f61
      https://github.com/RIOT-OS/RIOT/commit/2efc50be97b4b63ae7a51a6e273eb4ebbb721f61
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M sys/arduino/SPI.cpp

  Log Message:
  -----------
  sys/arduino: update SPI class to new API


  Commit: a1cbcc9edef94c46ccb8a35615049a0e61d80868
      https://github.com/RIOT-OS/RIOT/commit/a1cbcc9edef94c46ccb8a35615049a0e61d80868
  Author: Francisco <femolina at uc.cl>
  Date:   2021-09-02 (Thu, 02 Sep 2021)

  Changed paths:
    M cpu/atmega_common/periph/spi.c
    M cpu/atxmega/periph/spi.c
    M cpu/cc2538/periph/spi.c
    M cpu/efm32/periph/spi.c
    M cpu/esp_common/periph/spi.c
    M cpu/fe310/periph/spi.c
    M cpu/kinetis/periph/spi.c
    M cpu/lm4f120/periph/spi.c
    M cpu/lpc23xx/periph/spi.c
    M cpu/msp430fxyz/periph/spi.c
    M cpu/native/periph/spidev_linux.c
    M cpu/nrf51/periph/spi.c
    M cpu/nrf52/periph/spi.c
    M cpu/qn908x/periph/spi.c
    M cpu/sam0_common/periph/spi.c
    M cpu/sam3/periph/spi.c
    M cpu/stm32/periph/spi.c
    M drivers/at25xxx/at25xxx.c
    M drivers/at86rf2xx/at86rf2xx_netdev.c
    M drivers/ata8520e/ata8520e.c
    M drivers/bmx280/bmx280.c
    M drivers/cc110x/cc110x.c
    M drivers/cc110x/cc110x_calibration.c
    M drivers/cc110x/cc110x_communication.c
    M drivers/cc110x/cc110x_netdev.c
    M drivers/cc110x/cc110x_rx_tx.c
    M drivers/cc110x/include/cc110x_communication.h
    M drivers/include/periph/spi.h
    M drivers/include/soft_spi.h
    M drivers/kw2xrf/kw2xrf_spi.c
    M drivers/lis2dh12/lis2dh12.c
    M drivers/nrf24l01p/nrf24l01p.c
    M drivers/nrf24l01p_ng/include/nrf24l01p_ng_communication.h
    M drivers/nrf24l01p_ng/nrf24l01p_ng_communication.c
    M drivers/nrf24l01p_ng/nrf24l01p_ng_netdev.c
    M drivers/soft_spi/soft_spi.c
    M sys/arduino/SPI.cpp
    M tests/driver_cc110x/sc_cc110x.c
    M tests/periph_spi/main.c

  Log Message:
  -----------
  Merge pull request #15902 from maribu/spi-api-change-1

drivers/periph_spi: let spi_acquire return void


Compare: https://github.com/RIOT-OS/RIOT/compare/550565f05250...a1cbcc9edef9


More information about the commits mailing list