Skip to content

Commit 769fd1e

Browse files
committed
SPI::write: fix number of transmitted symbols.
Independently on symbol size number of transferred symbols should be always 1.
1 parent baf9d19 commit 769fd1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/SPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ int SPI::write(int value)
156156
lock();
157157
_acquire();
158158
uint32_t ret = 0;
159-
spi_transfer(&_peripheral->spi, &value, (_bits+7)/8, &ret, (_bits+7)/8, NULL);
159+
spi_transfer(&_peripheral->spi, &value, 1, &ret, 1, NULL);
160160
unlock();
161161
return ret;
162162
}

0 commit comments

Comments
 (0)