GPS Device
Loading...
Searching...
No Matches
stm32f401re_gpio.c File Reference

GPIO driver implementation for STM32F401RE. More...

#include "stm32f401re_gpio.h"
#include "common.h"
#include "stm32f401re.h"
#include "stm32f401re_rcc.h"
#include "arm_cortex_m4_nvic.h"
Include dependency graph for stm32f401re_gpio.c:

Go to the source code of this file.

Functions

static void gpio_set_pclk (GPIO_REGDEF_ts const *gpio_port, EN_STATUS_te en_status)
 Enables or disables the peripheral clock for a GPIO port.
static PORT_CODES_ts get_syscfg_code (GPIO_REGDEF_ts const *gpio_port)
 Returns the SYSCFG port code for a GPIO port instance.
static uint8_t get_exti_position (GPIO_CFG_ts const *gpio_cfg)
 Returns the IRQ number for the EXTI line corresponding to a GPIO pin.
void gpio_init (GPIO_CFG_ts *gpio_cfg)
 Initializes a GPIO pin according to the given configuration.
void gpio_deinit (GPIO_REGDEF_ts const *gpio_port)
 Deinitializes a GPIO port by resetting its registers to reset values.
void gpio_write (GPIO_REGDEF_ts *gpio_port, uint8_t gpio_pin, PIN_STATUS_te pin_status)
 Drives a GPIO output pin high or low.
PIN_STATUS_te gpio_read (GPIO_REGDEF_ts const *gpio_port, uint8_t gpio_pin)
 Reads the current logic level of a GPIO input pin.
void gpio_clear_interrupt (EXTI_LINES_te exti_line)
 Clears the EXTI pending flag for the given interrupt line.
void gpio_get_name (GPIO_REGDEF_ts const *gpio_port, char *name)
 Returns the name string of a GPIO port.

Detailed Description

GPIO driver implementation for STM32F401RE.

Author
github.com/Baksi675
Version
0.1
Date
2025-08-04

Definition in file stm32f401re_gpio.c.