changeset 3883:0741afa5048e

arch/nrf: fixed init condition
author Alexandre Becoulet <alexandre.becoulet@free.fr>
date Mon, 09 Apr 2018 13:19:10 +0200
parents 39dd0f3992d2
children df633b978a55
files arch/nrf5x/arch_init.c arch/nrf5x/nrf5x.config
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/arch/nrf5x/arch_init.c	Mon Apr 09 13:17:30 2018 +0200
+++ b/arch/nrf5x/arch_init.c	Mon Apr 09 13:19:10 2018 +0200
@@ -53,9 +53,11 @@
 #define NRF52832_R1   0x00650   // nRF52832 QFAAB0_1614 r1
 #define NRF52840_ENGA 0x00800   // nRF52840 QIAAAA_1644 engA
 
-void nrf52_init(void)
+void nrf5x_init(void)
 {
-#if 52000 >= CONFIG_NRF5X_MODEL && CONFIG_NRF5X_MODEL <= 52999
+#if CONFIG_NRF5X_MODEL >= 52000 && \
+    CONFIG_NRF5X_MODEL < 53000
+
 # ifndef CONFIG_DRIVER_NRF52_NFCT
   if (cpu_mem_read_32(NRF_UICR_NFCPINS) & NRF_UICR_NFCPINS_PROTECT_NFC) {
     flash_page_write(NRF_UICR_NFCPINS, (void*)(const uint32_t[]){ ~NRF_UICR_NFCPINS_PROTECT_NFC }, 4);
--- a/arch/nrf5x/nrf5x.config	Mon Apr 09 13:17:30 2018 +0200
+++ b/arch/nrf5x/nrf5x.config	Mon Apr 09 13:19:10 2018 +0200
@@ -23,11 +23,10 @@
   flags value
 %config end
 
-%init INIT_NRF52
+%init INIT_NRF5X
   parent CONFIG_ARCH_NRF5X
   during INIT_BOOTSTRAP
-  condition CONFIG_NRF5X_MODEL>=52000
-  function nrf52_init
+  function nrf5x_init
 %init end
 
 %config CONFIG_NRF5X_RADIO_DCDC