// // Created by cfif on 16.09.22. // #ifndef GPIOPIN_GPIOPIN_H #define GPIOPIN_GPIOPIN_H #include "GpioPinInterface.h" #include CMSIS_device_header #define GPIO_PIN_NOREVERSE false #define GPIO_PIN_REVERSE true tGpioPin vInitGpioPinPull( gpio_type *port, uint32_t pinMask, gpio_mode_type direction, bool reverse, crm_periph_clock_type clock, gpio_pull_type gpio_pull ); #define vInitGpioPin(PORT, PIN_MASK, DIR, REVERSE, CLK) vInitGpioPinPull(PORT,PIN_MASK,DIR,REVERSE,CLK, GPIO_PULL_NONE) tGpioPin vInitGpioPinOpenDrain(gpio_type *port, uint32_t pinMask, gpio_mode_type direction, bool reverse, crm_periph_clock_type clock); #define InitGpioPin(PORT, MASK, DIRECTION, REVERSE) \ vInitGpioPin(PORT, MASK, DIRECTION, REVERSE, CRM_##PORT##_PERIPH_CLOCK) #define InitGpioPinPull(PORT, MASK, DIRECTION, REVERSE, PULL) \ vInitGpioPinPull(PORT, MASK, DIRECTION, REVERSE, CRM_##PORT##_PERIPH_CLOCK, PULL) #define InitGpioPinOpenDrain(PORT, MASK, DIRECTION, REVERSE) \ vInitGpioPinOpenDrain(PORT, MASK, DIRECTION, REVERSE, CRM_##PORT##_PERIPH_CLOCK) void GpioPinSet(tGpioPin *pin, bool value); bool GpioPinGet(tGpioPin *pin); #endif //UVEOS_DEMO_ON_NIIET_MCU_GPIOPIN_H