aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/NRF52/Classic/Makefile2
-rw-r--r--os/hal/ports/NRF5/LLD/hal_spi_lld.c (renamed from os/hal/ports/NRF5/NRF51822/hal_spi_lld.c)15
-rw-r--r--os/hal/ports/NRF5/LLD/hal_spi_lld.h (renamed from os/hal/ports/NRF5/NRF51822/hal_spi_lld.h)4
-rw-r--r--os/hal/ports/NRF5/NRF51822/platform.mk4
-rw-r--r--os/hal/ports/NRF5/NRF52832/nrf_delay.h2
-rw-r--r--os/hal/ports/NRF5/NRF52832/platform.mk4
6 files changed, 22 insertions, 9 deletions
diff --git a/demos/NRF52/Classic/Makefile b/demos/NRF52/Classic/Makefile
index c509079..24f0f3a 100644
--- a/demos/NRF52/Classic/Makefile
+++ b/demos/NRF52/Classic/Makefile
@@ -49,7 +49,7 @@ endif
# If enabled, this option makes the build process faster by not compiling
# modules not used in the current configuration.
ifeq ($(USE_SMART_BUILD),)
- USE_SMART_BUILD = yes
+ USE_SMART_BUILD = no
endif
#
diff --git a/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c b/os/hal/ports/NRF5/LLD/hal_spi_lld.c
index 83b231f..0e90e3f 100644
--- a/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c
+++ b/os/hal/ports/NRF5/LLD/hal_spi_lld.c
@@ -15,8 +15,8 @@
*/
/**
- * @file NRF51822/spi_lld.c
- * @brief NRF51822 low level SPI driver code.
+ * @file NRF5/LLD/hal_spi_lld.c
+ * @brief NRF5 low level SPI driver code.
*
* @addtogroup SPI
* @{
@@ -76,7 +76,10 @@ static void serve_interrupt(SPIDriver *spip) {
// Clear SPI READY event flag
port->EVENTS_READY = 0;
-
+#if CORTEX_MODEL >= 4
+ (void)port->EVENTS_READY;
+#endif
+
if (spip->rxptr != NULL) {
*(uint8_t *)spip->rxptr++ = port->RXD;
}
@@ -209,6 +212,9 @@ void spi_lld_start(SPIDriver *spip) {
/* clear events flag */
spip->port->EVENTS_READY = 0;
+#if CORTEX_MODEL >= 4
+ (void)spip->port->EVENTS_READY;
+#endif
}
/**
@@ -366,6 +372,9 @@ uint16_t spi_lld_polled_exchange(SPIDriver *spip, uint16_t frame) {
while (spip->port->EVENTS_READY == 0)
;
spip->port->EVENTS_READY = 0;
+#if CORTEX_MODEL >= 4
+ (void)spip->port->EVENTS_READY;
+#endif
return spip->port->RXD;
}
diff --git a/os/hal/ports/NRF5/NRF51822/hal_spi_lld.h b/os/hal/ports/NRF5/LLD/hal_spi_lld.h
index 742a10b..afad5ab 100644
--- a/os/hal/ports/NRF5/NRF51822/hal_spi_lld.h
+++ b/os/hal/ports/NRF5/LLD/hal_spi_lld.h
@@ -15,8 +15,8 @@
*/
/**
- * @file NRF51822/spi_lld.h
- * @brief NRF51822 low level SPI driver header.
+ * @file NRF/LLD/hal_spi_lld.h
+ * @brief NRF5 low level SPI driver header.
*
* @addtogroup SPI
* @{
diff --git a/os/hal/ports/NRF5/NRF51822/platform.mk b/os/hal/ports/NRF5/NRF51822/platform.mk
index a8526b7..587aebd 100644
--- a/os/hal/ports/NRF5/NRF51822/platform.mk
+++ b/os/hal/ports/NRF5/NRF51822/platform.mk
@@ -13,7 +13,7 @@ ifneq ($(findstring HAL_USE_SERIAL TRUE,$(HALCONF)),)
PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_serial_lld.c
endif
ifneq ($(findstring HAL_USE_SPI TRUE,$(HALCONF)),)
-PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c
+PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_spi_lld.c
endif
ifneq ($(findstring HAL_USE_EXT TRUE,$(HALCONF)),)
PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/NRF51822/hal_ext_lld_isr.c \
@@ -46,7 +46,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/ports/common/ARMCMx/nvic.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_pal_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_serial_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_st_lld.c \
- ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/NRF51822/hal_spi_lld.c \
+ ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_spi_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/NRF51822/hal_ext_lld_isr.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/NRF51822/hal_ext_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/NRF51822/hal_i2c_lld.c \
diff --git a/os/hal/ports/NRF5/NRF52832/nrf_delay.h b/os/hal/ports/NRF5/NRF52832/nrf_delay.h
index 55a40e3..9b5df64 100644
--- a/os/hal/ports/NRF5/NRF52832/nrf_delay.h
+++ b/os/hal/ports/NRF5/NRF52832/nrf_delay.h
@@ -27,7 +27,7 @@
inline static void nrf_delay_us(uint32_t volatile number_of_us) __attribute__((always_inline));
inline static void nrf_delay_us(uint32_t volatile number_of_us)
{
-register uint32_t delay asm ("r0") = number_of_us;
+register uint32_t delay __asm ("r0") = number_of_us;
__asm volatile (
".syntax unified\n"
"1:\n"
diff --git a/os/hal/ports/NRF5/NRF52832/platform.mk b/os/hal/ports/NRF5/NRF52832/platform.mk
index 7ce922f..38bc015 100644
--- a/os/hal/ports/NRF5/NRF52832/platform.mk
+++ b/os/hal/ports/NRF5/NRF52832/platform.mk
@@ -12,6 +12,9 @@ endif
ifneq ($(findstring HAL_USE_SERIAL TRUE,$(HALCONF)),)
PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_serial_lld.c
endif
+ifneq ($(findstring HAL_USE_SPI TRUE,$(HALCONF)),)
+PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_spi_lld.c
+endif
ifneq ($(findstring HAL_USE_GPT TRUE,$(HALCONF)),)
PLATFORMSRC += ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_gpt_lld.c
endif
@@ -29,6 +32,7 @@ PLATFORMSRC = ${CHIBIOS}/os/hal/ports/common/ARMCMx/nvic.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/NRF52832/hal_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_pal_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_serial_lld.c \
+ ${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_spi_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_st_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_gpt_lld.c \
${CHIBIOS_CONTRIB}/os/hal/ports/NRF5/LLD/hal_wdg_lld.c \