commit 628272f75338267c80cc59561759cb72493b47d8 Author: cfif Date: Mon Jun 2 13:26:40 2025 +0300 Init diff --git a/Inc/UserButtonsInterface.h b/Inc/UserButtonsInterface.h new file mode 100644 index 0000000..d798f4d --- /dev/null +++ b/Inc/UserButtonsInterface.h @@ -0,0 +1,25 @@ +// +// Created by xemon on 17.11.22. +// + +#ifndef UVEOS_ON_NATION_USERBUTTONSINTERFACE_H +#define UVEOS_ON_NATION_USERBUTTONSINTERFACE_H + +#include "UserInputButtonEvent.h" +#include "stdbool.h" + +typedef bool (*userButtonsNextEventCall)(void *env, tUserInputButtonEvent *event, uint32_t timeout); + +typedef bool (*userButtonsCall)(void *env); + +typedef struct { + void *env; + userButtonsNextEventCall getNextEvent; + userButtonsCall clear; +} tUserButtonsInterface; + +#define UserButtons_GetNext(ENV, EVENT, TIMEOUT) (ENV)->getNextEvent((ENV)->env,EVENT,TIMEOUT) +#define UserButtons_Clear(ENV) (ENV)->clear((ENV)->env) + + +#endif //UVEOS_ON_NATION_USERBUTTONSINTERFACE_H diff --git a/Src/UserButtonsInterface.c b/Src/UserButtonsInterface.c new file mode 100644 index 0000000..2815e5f --- /dev/null +++ b/Src/UserButtonsInterface.c @@ -0,0 +1,4 @@ +// +// Created by xemon on 17.11.22. +// + diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..6b9dcc6 --- /dev/null +++ b/modular.json @@ -0,0 +1,17 @@ +{ + "dep": [ + { + "type": "git", + "provider": "Smart_Components_Aurus", + "repo": "UserInputEvent" + } + ], + "cmake": { + "inc_dirs": [ + "Inc" + ], + "srcs": [ + "Src/**.c" + ] + } +} \ No newline at end of file