File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -399,15 +399,19 @@ static void anomaly_122_uninit(const struct device *dev)
399399
400400 qspi_lock (dev );
401401
402- #ifdef CONFIG_MULTITHREADING
403- /* The last thread to finish using the driver uninit the QSPI */
404- (void ) k_sem_take (& dev_data -> count , K_NO_WAIT );
405- last = (k_sem_count_get (& dev_data -> count ) == 0 );
406- #endif
402+ if ( IS_ENABLED ( CONFIG_MULTITHREADING )) {
403+ /* The last thread to finish using the driver uninit the QSPI */
404+ (void ) k_sem_take (& dev_data -> count , K_NO_WAIT );
405+ last = (k_sem_count_get (& dev_data -> count ) == 0 );
406+ }
407407
408408 if (last ) {
409409 while (nrfx_qspi_mem_busy_check () != NRFX_SUCCESS ) {
410- k_msleep (50 );
410+ if (IS_ENABLED (CONFIG_MULTITHREADING )) {
411+ k_msleep (50 );
412+ } else {
413+ k_busy_wait (50000 );
414+ }
411415 }
412416
413417 nrf_gpio_cfg_output (QSPI_PROP_AT (csn_pins , 0 ));
You can’t perform that action at this time.
0 commit comments