Skip to content

Commit b4322a3

Browse files
mif1-nordicmasz-nordic
authored andcommitted
treewide: update error codes for nrfx_clock driver
Updated error codes for nrfx_clock and attached nrfx and zephyr revisions. Signed-off-by: Michal Frankiewicz <[email protected]>
1 parent 6c400f9 commit b4322a3

File tree

5 files changed

+4
-9
lines changed

5 files changed

+4
-9
lines changed

applications/nrf5340_audio/src/utils/peripherals.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ int peripherals_init(void)
149149

150150
/* Use this to turn on 128 MHz clock for cpu_app */
151151
ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
152-
ret -= NRFX_ERROR_BASE_NUM;
153152
if (ret) {
154153
return ret;
155154
}

drivers/mpsl/clock_control/nrfx_clock_mpsl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ void nrfx_clock_enable(void)
101101

102102
}
103103

104-
nrfx_err_t nrfx_clock_init(nrfx_clock_event_handler_t handler)
104+
int nrfx_clock_init(nrfx_clock_event_handler_t handler)
105105
{
106106
event_handler = handler;
107107

108-
return NRFX_SUCCESS;
108+
return 0;
109109
}
110110

111111

samples/bluetooth/nrf_auraconfig/src/nrf_auraconfig.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,6 @@ void nrf_auraconfig_main(void)
703703
LOG_DBG("Main started");
704704

705705
ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
706-
ret -= NRFX_ERROR_BASE_NUM;
707706
ERR_CHK_MSG(ret, "Failed to set HFCLK divider");
708707

709708
ret = led_init();

subsys/net/lib/nrf70_fw_ext/ext_fw_load.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,7 @@ static void enable_xip_and_set_cpu_freq(void)
257257
/* Set CPU frequency to 64MHz (DIV_2) */
258258
int ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_2);
259259

260-
if (ret != NRFX_SUCCESS) {
261-
ret -= NRFX_ERROR_BASE_NUM;
260+
if (ret != 0) {
262261
LOG_ERR("Failed to set CPU frequency: %d", ret);
263262
return;
264263
}
@@ -293,8 +292,7 @@ static void disable_xip_and_restore_cpu_freq(void)
293292
if (current_divider != saved_divider) {
294293
int ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, saved_divider);
295294

296-
if (ret != NRFX_SUCCESS) {
297-
ret -= NRFX_ERROR_BASE_NUM;
295+
if (ret != 0) {
298296
LOG_ERR("Failed to restore CPU frequency: %d", ret);
299297
} else {
300298
LOG_DBG("CPU frequency restored to original value");

tests/bluetooth/iso/src/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ static int hfclock_config_and_start(void)
1818
/* Use this to turn on 128 MHz clock for cpu_app */
1919
ret = nrfx_clock_divider_set(NRF_CLOCK_DOMAIN_HFCLK, NRF_CLOCK_HFCLK_DIV_1);
2020

21-
ret -= NRFX_ERROR_BASE_NUM;
2221
if (ret) {
2322
return ret;
2423
}

0 commit comments

Comments
 (0)