GpioPin_AutoChips_AC7840x/Inc/GpioPin.h

36 lines
799 B
C

//
// Created by cfif on 16.09.22.
//
#ifndef GPIOPIN_GPIOPIN_H
#define GPIOPIN_GPIOPIN_H
#include "GpioPinInterface.h"
#include CMSIS_device_header
#include "gpio_drv.h"
#define GPIO_PIN_NOREVERSE false
#define GPIO_PIN_REVERSE true
tGpioPin vInitGpioPinPull(
PORT_Type *port,
GPIO_Type *gpio,
uint32_t pinMask,
port_data_direction_t direction,
bool reverse,
port_pull_config_t gpio_pull
);
#define InitGpioPin(PORT, GPIO, MASK, DIRECTION, REVERSE) \
vInitGpioPinPull(PORT, GPIO, MASK, DIRECTION, REVERSE, PORT_INTERNAL_PULL_NOT_ENABLED)
#define InitGpioPinPull(PORT, MASK, DIRECTION, REVERSE, PULL) \
vInitGpioPinPull(PORT, MASK, DIRECTION, REVERSE, PULL)
void GpioPinSet(tGpioPin *pin, bool value);
bool GpioPinGet(tGpioPin *pin);
#endif