aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/NRF5/LLD/hal_spi_lld.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/NRF5/LLD/hal_spi_lld.c')
-rw-r--r--os/hal/ports/NRF5/LLD/hal_spi_lld.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/os/hal/ports/NRF5/LLD/hal_spi_lld.c b/os/hal/ports/NRF5/LLD/hal_spi_lld.c
index 0e90e3f..2c6ec91 100644
--- a/os/hal/ports/NRF5/LLD/hal_spi_lld.c
+++ b/os/hal/ports/NRF5/LLD/hal_spi_lld.c
@@ -204,9 +204,15 @@ void spi_lld_start(SPIDriver *spip) {
/* Configuration.*/
spip->port->CONFIG = config;
+#if NRF_SERIES == 51
spip->port->PSELSCK = spip->config->sckpad;
spip->port->PSELMOSI = spip->config->mosipad;
spip->port->PSELMISO = spip->config->misopad;
+#else
+ spip->port->PSEL.SCK = spip->config->sckpad;
+ spip->port->PSEL.MOSI = spip->config->mosipad;
+ spip->port->PSEL.MISO = spip->config->misopad;
+#endif
spip->port->FREQUENCY = spip->config->freq;
spip->port->ENABLE = (SPI_ENABLE_ENABLE_Enabled << SPI_ENABLE_ENABLE_Pos);