From 60ebdd93f802ed662d83fe68bc52232f019cf10b Mon Sep 17 00:00:00 2001 From: cfif Date: Fri, 24 Jan 2025 13:22:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BD=D0=BE=D0=B2=D1=83=D1=8E=20=D0=BE=D1=80?= =?UTF-8?q?=D0=B3=D0=B0=D0=BD=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20GONEC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inc/SpiPort.h | 16 ++++++++++++++++ modular.json | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 Inc/SpiPort.h create mode 100644 modular.json diff --git a/Inc/SpiPort.h b/Inc/SpiPort.h new file mode 100644 index 0000000..6fd71df --- /dev/null +++ b/Inc/SpiPort.h @@ -0,0 +1,16 @@ +// +// Created by cfif on 028.09.22. +// + +#ifndef SPIPORT_H +#define SPIPORT_H + +#include "SpiPortIO.h" + +#define SpiPortReceive(PORT_IO, DATA, TIMEOUT) (PORT_IO)->receive((PORT_IO)->env,DATA,TIMEOUT) +#define SpiPortTransmit(PORT_IO, DATA, TIMEOUT) (PORT_IO)->transmit((PORT_IO)->env,DATA,TIMEOUT) + +#define SpiPortChipSelect(PORT_IO, TIMEOUT) (PORT_IO)->chipSelect((PORT_IO)->env,TIMEOUT) +#define SpiPortChipRelease(PORT_IO, TIMEOUT) (PORT_IO)->chipRelease((PORT_IO)->env,TIMEOUT) + +#endif //SPIPORT_H diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..d74be9d --- /dev/null +++ b/modular.json @@ -0,0 +1,17 @@ +{ + "dep": [ + { + "type": "git", + "provider": "GONEC", + "repo": "SpiPortInterface" + } + ], + "cmake": { + "inc_dirs": [ + "Inc" + ], + "srcs": [ + "Src/**.c" + ] + } +} \ No newline at end of file