zephyr/subsys/portability/cmsis_rtos_v1/cmsis_wait.c
Gerard Marull-Paretas 5113c1418d subsystems: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all subsystems code to
the new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-09 12:07:35 +02:00

21 lines
327 B
C

/*
* 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;
}