summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@chickadee.tech>2017-09-01 12:44:52 -0700
committerScott Shawcroft <scott@chickadee.tech>2017-09-01 12:44:52 -0700
commite2f39a8d936605f27f89a1216054eb8c43b62e2f (patch)
tree3f1ca3c10cc665a68656c95b799c2d3e9c82119e
parent4d0dc4b2985f0da924011b20706c6a99e52f17d2 (diff)
atmel-samd: Remember SPI baudrate.
This prevents the SERCOM from blipping the data line on each transaction and therefore fixes #219.
-rw-r--r--atmel-samd/common-hal/busio/SPI.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/atmel-samd/common-hal/busio/SPI.c b/atmel-samd/common-hal/busio/SPI.c
index f3f289f37..c7e7d6fd7 100644
--- a/atmel-samd/common-hal/busio/SPI.c
+++ b/atmel-samd/common-hal/busio/SPI.c
@@ -174,6 +174,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self,
if (status != STATUS_OK) {
return false;
}
+ self->current_baudrate = baudrate;
}
SercomSpi *const spi_module = &(self->spi_master_instance.hw->SPI);