commit e1300f6031723b21def8c63bba0158bbc2152169 Author: cfif Date: Wed Dec 4 13:10:48 2024 +0300 Init diff --git a/Src/SystemDelayCmsisRtos.c b/Src/SystemDelayCmsisRtos.c new file mode 100644 index 0000000..fc402b0 --- /dev/null +++ b/Src/SystemDelayCmsisRtos.c @@ -0,0 +1,22 @@ +// +// Created by xemon on 29.08.22. +// +#include +#include "SystemDelayInterface.h" +#include "systickcounter.h" + +const uint32_t SystemWaitForever = osWaitForever; + +void SystemDelayMs(uint32_t ms) { + osDelay(SystemMsToTicks(ms)); +} + +uint32_t SystemMsToTicks(uint32_t ms) { + return (ms * osKernelGetTickFreq()) / 1000; +} + +uint32_t SystemGetMs() { +// return (osKernelGetTickCount() * osKernelGetTickFreq()) / 1000; +// return (__sys_tick_counter * osKernelGetTickFreq()) / 1000; + return __sys_tick_counter; +} \ No newline at end of file diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..ef12d8e --- /dev/null +++ b/modular.json @@ -0,0 +1,21 @@ +{ + "dep": [ + { + "type": "git", + "provider": "NAVIGATOR_UVEOS_NATION_TELIT", + "repo": "CmsisRtosInterface" + }, + { + "type": "git", + "provider": "NAVIGATOR_UVEOS_NATION_TELIT", + "repo": "SystemDelayInterface" + } + ], + "cmake": { + "inc_dirs": [ + ], + "srcs": [ + "Src/**.c" + ] + } +} \ No newline at end of file