diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2020-06-23 12:58:01 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2020-06-24 12:47:59 -0700 |
| commit | c5fa9730a87b47f569a2bc4a7599e67b198826e6 (patch) | |
| tree | b071b125bf70a9eecb0ab0e26553265acebe9ec7 /ports/atmel-samd | |
| parent | fc9c0ba5731a7eb1188366841a9a564074e7052f (diff) | |
Compiles!
Diffstat (limited to 'ports/atmel-samd')
| -rw-r--r-- | ports/atmel-samd/common-hal/busio/SPI.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/atmel-samd/common-hal/busio/SPI.c b/ports/atmel-samd/common-hal/busio/SPI.c index 1dc389027..921713d69 100644 --- a/ports/atmel-samd/common-hal/busio/SPI.c +++ b/ports/atmel-samd/common-hal/busio/SPI.c @@ -341,7 +341,7 @@ bool common_hal_busio_spi_read(busio_spi_obj_t *self, return status >= 0; // Status is number of chars read or an error code < 0. } -bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, uint8_t *data_out, uint8_t *data_in, size_t len) { +bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_out, uint8_t *data_in, size_t len) { if (len == 0) { return true; } @@ -350,7 +350,7 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, uint8_t *data_out, uin status = sercom_dma_transfer(self->spi_desc.dev.prvt, data_out, data_in, len); } else { struct spi_xfer xfer; - xfer.txbuf = data_out; + xfer.txbuf = (uint8_t*) data_out; xfer.rxbuf = data_in; xfer.size = len; status = spi_m_sync_transfer(&self->spi_desc, &xfer); |
