Добавлен интерфейс GPIO

This commit is contained in:
cfif 2025-07-14 12:13:45 +03:00
commit b9edd0d98e
2 changed files with 31 additions and 0 deletions

24
Inc/GpioPinInterface.h Normal file
View File

@ -0,0 +1,24 @@
//
// Created by cfif
#ifndef ABSTRACTGPIOPIN_GPIOPININTERFACE_H
#define ABSTRACTGPIOPIN_GPIOPININTERFACE_H
#include "stdint.h"
#include "stdbool.h"
typedef struct {
bool reverse;
void *port;
void *gpio;
uint32_t pin;
} tGpioPin;
void GpioPinSet(tGpioPin *pin, bool value);
bool GpioPinGet(tGpioPin *pin);
#define GpioPinEnable(PIN) GpioPinSet(PIN,true)
#define GpioPinDisable(PIN) GpioPinSet(PIN,false)
#endif //ABSTRACTGPIOPIN_GPIOPININTERFACE_H

7
modular.json Normal file
View File

@ -0,0 +1,7 @@
{
"cmake": {
"inc_dirs": [
"Inc"
]
}
}