Skip to content

Commit

Permalink
nrf: Use the right SPI registers on nRF52840
Browse files Browse the repository at this point in the history
  • Loading branch information
arturo182 committed Feb 2, 2018
1 parent a776c2a commit d0b451b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ports/nrf/common-hal/busio/SPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,15 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) {
return;
}

#ifdef NRF52840_XXAA
self->spi->PSEL.SCK = SPI_PSEL_SCK_CONNECT_Disconnected;
self->spi->PSEL.MOSI = SPI_PSEL_MOSI_CONNECT_Disconnected;
self->spi->PSEL.MISO = SPI_PSEL_MISO_CONNECT_Disconnected;
#else
self->spi->PSELSCK = SPI_PSEL_SCK_PSELSCK_Disconnected;
self->spi->PSELMOSI = SPI_PSEL_MOSI_PSELMOSI_Disconnected;
self->spi->PSELMISO = SPI_PSEL_MISO_PSELMISO_Disconnected;

#endif
// reset_pin(self->clock_pin);
// reset_pin(self->MOSI_pin);
// reset_pin(self->MISO_pin);
Expand Down

0 comments on commit d0b451b

Please sign in to comment.