24 lines
472 B
C
24 lines
472 B
C
//
|
|
// Created by xemon 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
|