test

Fork of mbed-dev by mbed official

Revision:
166:e614a9f1c9e2
Parent:
160:d5399cc887bb
Child:
168:e84263d55307
--- a/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c	Wed May 10 12:06:41 2017 +0100
+++ b/targets/TARGET_NORDIC/TARGET_NRF5/spi_api.c	Fri May 26 12:39:01 2017 +0100
@@ -48,6 +48,7 @@
 #include "nrf_drv_spi.h"
 #include "nrf_drv_spis.h"
 #include "app_util_platform.h"
+#include "sdk_config.h"
 
 #if DEVICE_SPI_ASYNCH
     #define SPI_IDX(obj)    ((obj)->spi.spi_idx)
@@ -186,7 +187,7 @@
         // And prepare for the next transfer.
         // Previous data set in 'spi_slave_write' (if any) has been transmitted,
         // now use the default one, until some new is set by 'spi_slave_write'.
-        p_spi_info->tx_buf = NRF_DRV_SPIS_DEFAULT_ORC;
+        p_spi_info->tx_buf = SPIS_DEFAULT_ORC;
         nrf_drv_spis_buffers_set(&m_instances[spi_idx].slave,
             (uint8_t const *)&p_spi_info->tx_buf, 1,
             (uint8_t *)&p_spi_info->rx_buf, 1);
@@ -228,7 +229,7 @@
     p_config->frequency = p_spi_info->frequency;
     p_config->mode      = (nrf_drv_spi_mode_t)p_spi_info->spi_mode;
 
-    p_config->irq_priority = SPI1_CONFIG_IRQ_PRIORITY;
+    p_config->irq_priority = SPI_DEFAULT_CONFIG_IRQ_PRIORITY;
     p_config->orc          = 0xFF;
     p_config->bit_order    = NRF_DRV_SPI_BIT_ORDER_MSB_FIRST;
 }
@@ -242,9 +243,9 @@
     p_config->csn_pin   = p_spi_info->ss_pin;
     p_config->mode      = (nrf_drv_spis_mode_t)p_spi_info->spi_mode;
 
-    p_config->irq_priority = SPIS1_CONFIG_IRQ_PRIORITY;
-    p_config->orc          = NRF_DRV_SPIS_DEFAULT_ORC;
-    p_config->def          = NRF_DRV_SPIS_DEFAULT_DEF;
+    p_config->irq_priority = SPIS_DEFAULT_CONFIG_IRQ_PRIORITY;
+    p_config->orc          = SPIS_DEFAULT_ORC;
+    p_config->def          = SPIS_DEFAULT_DEF;
     p_config->bit_order    = NRF_DRV_SPIS_BIT_ORDER_MSB_FIRST;
     p_config->csn_pullup   = NRF_DRV_SPIS_DEFAULT_CSN_PULLUP;
     p_config->miso_drive   = NRF_DRV_SPIS_DEFAULT_MISO_DRIVE;
@@ -379,7 +380,7 @@
             m_slave_event_handlers[SPI_IDX(obj)]);
 
         // Prepare the slave for transfer.
-        p_spi_info->tx_buf = NRF_DRV_SPIS_DEFAULT_ORC;
+        p_spi_info->tx_buf = SPIS_DEFAULT_ORC;
         nrf_drv_spis_buffers_set(SLAVE_INST(obj),
             (uint8_t const *)&p_spi_info->tx_buf, 1,
             (uint8_t *)&p_spi_info->rx_buf, 1);