28 lines
606 B
C
28 lines
606 B
C
#ifndef INCLUDED_OS_UTILS_H
|
|
#define INCLUDED_OS_UTILS_H
|
|
|
|
#ifndef INCLUDED_OS_TYPES_H
|
|
#include <os_types.h>
|
|
#endif /*INCLUDED_OS_TYPES_H*/
|
|
|
|
#ifndef INCLUDED_OS_MACROS_H
|
|
#include <os_macros.h>
|
|
#endif /*INCLUDED_OS_MACROS_H*/
|
|
|
|
#ifndef INCLUDED_OS_COMPILER_H
|
|
#include <os_compiler.h>
|
|
#endif /*INCLUDED_OS_COMPILER_H*/
|
|
|
|
/* ------------------------------------------------------------------------------------------------------------------ */
|
|
/* */
|
|
|
|
OS_STATIC_FORCE_INLINE
|
|
os_tick_t os_tick_from_ms(os_size_t ms){
|
|
return (os_tick_t)((ms * OS_CFG_TICKS_PER_SECOND)/1000);
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /*INCLUDED_OS_UTILS_H*/
|