commit db8bd8c7f3dd2606eb2e2c73283907cb091aa8c3 Author: cfif Date: Tue Mar 11 12:05:56 2025 +0300 Переход в новую организацию diff --git a/Src/SystemDelayCmsisRtos.c b/Src/SystemDelayCmsisRtos.c new file mode 100755 index 0000000..190f66c --- /dev/null +++ b/Src/SystemDelayCmsisRtos.c @@ -0,0 +1,19 @@ +// +// Created by xemon on 29.08.22. +// +#include +#include "SystemDelayInterface.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; +} \ No newline at end of file diff --git a/modular.json b/modular.json new file mode 100755 index 0000000..f584218 --- /dev/null +++ b/modular.json @@ -0,0 +1,21 @@ +{ + "dep": [ + { + "type": "git", + "provider": "GONEC_BOOT_MODEM", + "repo": "CmsisRtosInterface" + }, + { + "type": "git", + "provider": "GONEC_BOOT_MODEM", + "repo": "SystemDelayInterface" + } + ], + "cmake": { + "inc_dirs": [ + ], + "srcs": [ + "Src/**.c" + ] + } +} \ No newline at end of file