Skip to content

Commit c24c463

Browse files
ananglioannisg
authored andcommitted
soc: nordic: Include <nrfx.h> instead of <nrf.h> from <soc.h>
This change is done so that there is no need to additionaly include <nrfx.h> before <soc/nrfx_coredep.h> (what might be a bit surprising) and so that <nrfx_config.h> doesn't need to be include separately for nRF SoCs requiring a special mapping of peripheral accessing symbols. This commit removes also no longer needed inclusions and updates the hal_nordic module with required minor correction of nrfx_glue.h. Signed-off-by: Andrzej Głąbek <[email protected]>
1 parent 57c6cfc commit c24c463

File tree

9 files changed

+4
-13
lines changed

9 files changed

+4
-13
lines changed

drivers/sensor/nrf5/temp_nrf5.c

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
LOG_MODULE_REGISTER(temp_nrf5, CONFIG_SENSOR_LOG_LEVEL);
1515

16-
#include "nrf.h"
17-
1816

1917
/* The nRF5 temperature device returns measurements in 0.25C
2018
* increments. Scale to mDegrees C.

samples/boards/nrf52/mesh/onoff-app/src/main.c

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#include <sys/printk.h>
4040
#include <settings/settings.h>
4141
#include <sys/byteorder.h>
42-
#include <nrf.h>
4342
#include <device.h>
4443
#include <drivers/gpio.h>
4544
#include <bluetooth/bluetooth.h>

soc/arm/nordic_nrf/nrf51/soc.c

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include <kernel.h>
1717
#include <init.h>
18-
#include <nrfx.h>
1918
#include <hal/nrf_power.h>
2019
#include <soc/nrfx_coredep.h>
2120
#include <logging/log.h>

soc/arm/nordic_nrf/nrf51/soc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifndef _ASMLANGUAGE
1515

1616
#include <nrf_common.h>
17-
#include <nrf.h>
17+
#include <nrfx.h>
1818

1919
/* Add include for DTS generated information */
2020
#include <generated_dts_board.h>

soc/arm/nordic_nrf/nrf52/soc.c

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <kernel.h>
1616
#include <init.h>
1717
#include <cortex_m/exc.h>
18-
#include <nrfx.h>
1918
#include <hal/nrf_power.h>
2019
#include <soc/nrfx_coredep.h>
2120
#include <logging/log.h>

soc/arm/nordic_nrf/nrf52/soc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifndef _ASMLANGUAGE
1515

1616
#include <nrf_common.h>
17-
#include <nrf.h>
17+
#include <nrfx.h>
1818

1919
/* Add include for DTS generated information */
2020
#include <generated_dts_board.h>

soc/arm/nordic_nrf/nrf91/soc.c

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <kernel.h>
1616
#include <init.h>
1717
#include <cortex_m/exc.h>
18-
#include <nrfx.h>
1918
#include <soc/nrfx_coredep.h>
2019
#include <logging/log.h>
2120

soc/arm/nordic_nrf/nrf91/soc.h

+1-4
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@
1313

1414
#ifndef _ASMLANGUAGE
1515

16-
#include <nrf.h>
16+
#include <nrfx.h>
1717

1818
/* Add include for DTS generated information */
1919
#include <generated_dts_board.h>
2020

21-
/* Add include for peripheral base address mappings */
22-
#include <nrfx_config.h>
23-
2421
#endif /* !_ASMLANGUAGE */
2522

2623
#define FLASH_PAGE_ERASE_MAX_TIME_US 89700UL

west.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ manifest:
4444
revision: a12d92816a53a521d79cefcf5c38b9dc8a4fed6e
4545
path: modules/hal/cypress
4646
- name: hal_nordic
47-
revision: 6a4181a794e71fbf6e9a7c857aaff8e2e7a9602f
47+
revision: db6277a1266cbcbd5588959bbacc1cd5670aed0e
4848
path: modules/hal/nordic
4949
- name: hal_openisa
5050
revision: be5c01f86c96500def5079bcc58d2baefdffb6c8

0 commit comments

Comments
 (0)