File tree Expand file tree Collapse file tree 5 files changed +4
-9
lines changed
applications/nrf5340_audio/src/utils
drivers/mpsl/clock_control
samples/bluetooth/nrf_auraconfig/src
subsys/net/lib/nrf70_fw_ext Expand file tree Collapse file tree 5 files changed +4
-9
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 ();
Original file line number Diff line number Diff 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" );
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments