Add an reference to the linux specific max spi bytes size

This commit is contained in:
Chris
2018-10-12 11:35:13 +02:00
parent 6b89ee1b8e
commit 4916ac674a
+1
View File
@@ -103,6 +103,7 @@ where
// transfer spi data
// Be careful!! Linux has a default limit of 4096 bytes per spi transfer
// see https://raspberrypi.stackexchange.com/questions/65595/spi-transfer-fails-with-buffer-size-greater-than-4096
if cfg!(target_os = "linux") {
for data_chunk in data.chunks(4096) {
spi.write(data_chunk)?;