From 6e883e276f03d17ab56d8fc414879acee70933d8 Mon Sep 17 00:00:00 2001 From: cfif Date: Mon, 26 May 2025 14:41:46 +0300 Subject: [PATCH] Init --- Rtcs.c | 12 ++++++++++++ Rtcs.h | 19 +++++++++++++++++++ modular.json | 10 ++++++++++ 3 files changed, 41 insertions(+) create mode 100644 Rtcs.c create mode 100644 Rtcs.h create mode 100644 modular.json diff --git a/Rtcs.c b/Rtcs.c new file mode 100644 index 0000000..5f87c3c --- /dev/null +++ b/Rtcs.c @@ -0,0 +1,12 @@ +// +// Created by cfif on 27.09.22. +// +#include "Rtcs.h" +#include "at32f435_437.h" + +tRtcs RTCS; + +void Rtcs_Init() { + RTCS.rtc = vRtcInit(); + RTCS.rtcI0 = vRtcGetIo(&RTCS.rtc); +} diff --git a/Rtcs.h b/Rtcs.h new file mode 100644 index 0000000..2a9b7ee --- /dev/null +++ b/Rtcs.h @@ -0,0 +1,19 @@ +// +// Created by cfif on 28.09.22. +// + +#ifndef RTCS_H +#define RTCS_H + +#include "RtcArtery.h" + +typedef struct { + tRtcArtery rtc; + tRtcIO rtcI0; +} tRtcs; + +extern tRtcs RTCS; + +void Rtcs_Init(); + +#endif //RTCS_H diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..0dd1901 --- /dev/null +++ b/modular.json @@ -0,0 +1,10 @@ +{ + "cmake": { + "inc_dirs": [ + "./" + ], + "srcs": [ + "./**.c" + ] + } +} \ No newline at end of file