GpioPinInterface/Inc/GpioPinInterface.h

24 lines
471 B
C

//
// Created by CFIF on 8/24/22.
//
#ifndef ABSTRACTGPIOPIN_GPIOPININTERFACE_H
#define ABSTRACTGPIOPIN_GPIOPININTERFACE_H
#include "stdint.h"
#include "stdbool.h"
typedef struct {
bool reverse;
uint8_t port;
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