zephyr/subsys/portability/cmsis_rtos_v1/cmsis_wait.c

22 lines
327 B
C
Raw Normal View History

/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/kernel.h>
#include <cmsis_os.h>
/**
* @brief Wait for Timeout (Time Delay in ms).
*/
osStatus osDelay(uint32_t delay_ms)
{
if (k_is_in_isr()) {
return osErrorISR;
}
k_msleep(delay_ms);
return osEventTimeout;
}