aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c
diff options
context:
space:
mode:
authorStephane D'Alu <sdalu@sdalu.com>2016-07-10 10:48:04 +0200
committerStephane D'Alu <sdalu@sdalu.com>2016-07-10 10:48:04 +0200
commit5259158d1727f3703bc90f88d50938eada316f67 (patch)
treef1e53477749e537639585384cbdc1bad2b21c5d6 /os/hal/ports/NRF5/NRF51822/hal_spi_lld.c
parentba393d3ae1c78c881ff3bf67c68c1f7c7642bcb0 (diff)
downloadChibiOS-Contrib-5259158d1727f3703bc90f88d50938eada316f67.tar.gz
ChibiOS-Contrib-5259158d1727f3703bc90f88d50938eada316f67.tar.bz2
ChibiOS-Contrib-5259158d1727f3703bc90f88d50938eada316f67.zip
renamed NRF51_* to NRF5_*
Diffstat (limited to 'os/hal/ports/NRF5/NRF51822/hal_spi_lld.c')
-rw-r--r--os/hal/ports/NRF5/NRF51822/hal_spi_lld.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c b/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c
index 7a70c13..83b231f 100644
--- a/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c
+++ b/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c
@@ -30,12 +30,12 @@
/* Driver exported variables. */
/*===========================================================================*/
-#if NRF51_SPI_USE_SPI0 || defined(__DOXYGEN__)
+#if NRF5_SPI_USE_SPI0 || defined(__DOXYGEN__)
/** @brief SPI1 driver identifier.*/
SPIDriver SPID1;
#endif
-#if NRF51_SPI_USE_SPI1 || defined(__DOXYGEN__)
+#if NRF5_SPI_USE_SPI1 || defined(__DOXYGEN__)
/** @brief SPI2 driver identifier.*/
SPIDriver SPID2;
#endif
@@ -107,7 +107,7 @@ static void serve_interrupt(SPIDriver *spip) {
/* Driver interrupt handlers. */
/*===========================================================================*/
-#if NRF51_SPI_USE_SPI0 || defined(__DOXYGEN__)
+#if NRF5_SPI_USE_SPI0 || defined(__DOXYGEN__)
/**
* @brief SPI0 interrupt handler.
*
@@ -120,7 +120,7 @@ CH_IRQ_HANDLER(Vector4C) {
CH_IRQ_EPILOGUE();
}
#endif
-#if NRF51_SPI_USE_SPI1 || defined(__DOXYGEN__)
+#if NRF5_SPI_USE_SPI1 || defined(__DOXYGEN__)
/**
* @brief SPI1 interrupt handler.
*
@@ -145,11 +145,11 @@ CH_IRQ_HANDLER(Vector50) {
*/
void spi_lld_init(void) {
-#if NRF51_SPI_USE_SPI0
+#if NRF5_SPI_USE_SPI0
spiObjectInit(&SPID1);
SPID1.port = NRF_SPI0;
#endif
-#if NRF51_SPI_USE_SPI1
+#if NRF5_SPI_USE_SPI1
spiObjectInit(&SPID2);
SPID2.port = NRF_SPI1;
#endif
@@ -166,13 +166,13 @@ void spi_lld_start(SPIDriver *spip) {
uint32_t config;
if (spip->state == SPI_STOP) {
-#if NRF51_SPI_USE_SPI0
+#if NRF5_SPI_USE_SPI0
if (&SPID1 == spip)
- nvicEnableVector(SPI0_TWI0_IRQn, NRF51_SPI_SPI0_IRQ_PRIORITY);
+ nvicEnableVector(SPI0_TWI0_IRQn, NRF5_SPI_SPI0_IRQ_PRIORITY);
#endif
-#if NRF51_SPI_USE_SPI1
+#if NRF5_SPI_USE_SPI1
if (&SPID2 == spip)
- nvicEnableVector(SPI1_TWI1_IRQn, NRF51_SPI_SPI1_IRQ_PRIORITY);
+ nvicEnableVector(SPI1_TWI1_IRQn, NRF5_SPI_SPI1_IRQ_PRIORITY);
#endif
}
@@ -223,11 +223,11 @@ void spi_lld_stop(SPIDriver *spip) {
if (spip->state != SPI_STOP) {
spip->port->ENABLE = (SPI_ENABLE_ENABLE_Disabled << SPI_ENABLE_ENABLE_Pos);
spip->port->INTENCLR = (SPI_INTENCLR_READY_Clear << SPI_INTENCLR_READY_Pos);
-#if NRF51_SPI_USE_SPI0
+#if NRF5_SPI_USE_SPI0
if (&SPID1 == spip)
nvicDisableVector(SPI0_TWI0_IRQn);
#endif
-#if NRF51_SPI_USE_SPI1
+#if NRF5_SPI_USE_SPI1
if (&SPID2 == spip)
nvicDisableVector(SPI1_TWI1_IRQn);
#endif