1003ab806c
No complexity here. The CMSIS API was always in milliseconds, needs nothing but a few wrapper macros for kernel timeout arguments. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
22 lines
320 B
C
22 lines
320 B
C
/*
|
|
* Copyright (c) 2018 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <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;
|
|
}
|