1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/cc2538/periph/spi: move assert to spi_acquire

This commit is contained in:
Marian Buschsieweke 2021-09-06 10:52:35 +02:00
parent 7381fb638a
commit 5964dea70c
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F

View File

@ -96,6 +96,7 @@ void spi_init_pins(spi_t bus)
void spi_acquire(spi_t bus, spi_cs_t cs, spi_mode_t mode, spi_clk_t clk)
{
assert((unsigned)bus < SPI_NUMOF);
DEBUG("%s: bus=%u\n", __FUNCTION__, bus);
(void)cs;
/* lock the bus */
@ -131,7 +132,6 @@ static uint8_t _trx(cc2538_ssi_t *dev, uint8_t in)
void spi_transfer_bytes(spi_t bus, spi_cs_t cs, bool cont,
const void *out, void *in, size_t len)
{
assert((unsigned)bus < SPI_NUMOF);
DEBUG("%s: bus=%u, len=%u\n", __FUNCTION__, bus, (unsigned)len);
const uint8_t *out_buf = out;