Skip to content

Commit 25aa047

Browse files
jerome-pouillerjhedberg
authored andcommitted
wiseconnect: Rely on k_usleep()
There is a risk of conflict if an driver directly access to the hardware resources. Here, the memory Controller directly access to the Timer which belong to the Timer driver. Fortunately, Zephyr provide a generic API. So it is not required to directly access to the hardware. Signed-off-by: Jérôme Pouiller <[email protected]>
1 parent e16f161 commit 25aa047

File tree

1 file changed

+2
-7
lines changed
  • wiseconnect/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src

1 file changed

+2
-7
lines changed

wiseconnect/components/device/silabs/si91x/mcu/drivers/peripheral_drivers/src/rsi_qspi.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
******************************************************************************/
2929

3030
// Include Files
31+
#include <zephyr/kernel.h>
3132

3233
#include "rsi_ccp_user_config.h"
3334

@@ -2647,13 +2648,7 @@ void qspi_spi_read(qspi_reg_t *qspi_reg,
26472648
*/
26482649
void qspi_usleep(uint32_t delay)
26492650
{
2650-
// Micro seconds delay
2651-
RSI_TIMERS_SetMatch(TIMERS, TIMER_0, delay);
2652-
// Start timer
2653-
RSI_TIMERS_TimerStart(TIMERS, TIMER_0);
2654-
// Wait for time out
2655-
while (!RSI_TIMERS_InterruptStatus(TIMERS, TIMER_0))
2656-
;
2651+
k_usleep(delay);
26572652
}
26582653

26592654
#if defined(SLI_SI917) || defined(SLI_SI915)

0 commit comments

Comments
 (0)