GpioPinInterface/Inc/GpioPinInterface.h

25 lines
471 B
C

//
// 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