Skip to content

Commit 0ced151

Browse files
committed
treewide: Replace clock api with clock api v2
Replaced old clock_control.h api with nrf_clock_control.h api. Old api is still available when CONFIG_CLOCK_CONTROL_NRF is set. Replaced nrfx_clock.h api calls with nrfx_clock_... calls. Signed-off-by: Michal Frankiewicz <[email protected]>
1 parent 9eef35c commit 0ced151

File tree

41 files changed

+306
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+306
-146
lines changed

applications/nrf5340_audio/src/audio/audio_datapath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <zephyr/zbus/zbus.h>
1313
#include <zephyr/kernel.h>
1414
#include <zephyr/shell/shell.h>
15-
#include <nrfx_clock.h>
15+
#include <nrfx_clock_hfclkaudio.h>
1616
#include <contin_array.h>
1717
#include <tone.h>
1818
#include <pcm_mix.h>

applications/nrf5340_audio/src/audio/le_audio_rx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <stdlib.h>
1010
#include <zephyr/kernel.h>
11-
#include <nrfx_clock.h>
1211

1312
#include "streamctrl.h"
1413
#include "audio_datapath.h"

applications/nrf5340_audio/src/modules/audio_i2s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <zephyr/device.h>
1111
#include <zephyr/drivers/pinctrl.h>
1212
#include <nrfx_i2s.h>
13-
#include <nrfx_clock.h>
13+
#include <nrfx_clock_hfclkaudio.h>
1414

1515
#include "audio_sync_timer.h"
1616

applications/nrf5340_audio/src/utils/peripherals.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66
#include "peripherals.h"
77

8-
#include <nrfx_clock.h>
8+
#include <nrfx_clock_hfclk.h>
99

1010
#include "led_assignments.h"
1111
#include "led.h"
@@ -148,10 +148,7 @@ int peripherals_init(void)
148148
}
149149

150150
/* Use this to turn on 128 MHz clock for cpu_app */
151-
ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
152-
if (ret) {
153-
return ret;
154-
}
151+
nrfx_clock_hfclk_divider_set(NRF_CLOCK_HFCLK_DIV_1);
155152

156153
return 0;
157154
}

applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/app.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
compatible = "nordic,nrf-spi";
33
status = "okay";
44
};
5+
6+
&lfclk {
7+
k32src = "CLOCK_CONTROL_NRF_K32SRC_RC";
8+
};

applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ CONFIG_QDEC_NRFX=y
8989
CONFIG_SPI=y
9090
CONFIG_SPI_NRFX=y
9191

92-
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
92+
CONFIG_CLOCK_CONTROL_NRF=n
9393

9494
CONFIG_BT_MAX_PAIRED=2
9595
CONFIG_BT_ID_MAX=3

applications/nrf_desktop/configuration/nrf52dmouse_nrf52832/prj_release.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CONFIG_QDEC_NRFX=y
8484
CONFIG_SPI=y
8585
CONFIG_SPI_NRFX=y
8686

87-
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
87+
CONFIG_CLOCK_CONTROL_NRF=n
8888

8989
CONFIG_BT_MAX_PAIRED=2
9090
CONFIG_BT_ID_MAX=3

applications/nrf_desktop/configuration/nrf52kbd_nrf52832/app.overlay

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
};
1111
};
1212
};
13+
14+
&lfclk {
15+
k32src = "CLOCK_CONTROL_NRF_K32SRC_RC";
16+
};

applications/nrf_desktop/configuration/nrf52kbd_nrf52832/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ CONFIG_LED_PWM=y
102102
# Disable unused LED driver to reduce memory footprint.
103103
CONFIG_LED_GPIO=n
104104

105-
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
105+
CONFIG_CLOCK_CONTROL_NRF=n
106106

107107
CONFIG_BT_MAX_PAIRED=4
108108
CONFIG_BT_ID_MAX=5

applications/nrf_desktop/configuration/nrf52kbd_nrf52832/prj_release.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ CONFIG_LED_PWM=y
9999
# Disable unused LED driver to reduce memory footprint.
100100
CONFIG_LED_GPIO=n
101101

102-
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
102+
CONFIG_CLOCK_CONTROL_NRF=n
103103

104104
CONFIG_BT_MAX_PAIRED=4
105105
CONFIG_BT_ID_MAX=5

0 commit comments

Comments
 (0)