FGPIO Peripheral driver
General-Purpose Input/Output (GPIO)
Collaboration diagram for FGPIO Peripheral driver:

This section describes the programming interface of the FGPIO Peripheral driver. The FGPIO driver configures the FGPIO module and provides a functional interface to build the GPIO application.

# Function groups

## FGPIO Configuration

This function group configures the FGPIO pin.

## FGPIO Output Operations

This function group sets the FGPIO pin output, such as write, set, clear, and toggle.

## FGPIO Input Operations

This function reads the FGPIO pin value.

## FGPIO Interrupt

This function group checks or clears the FGPIO pin interrupt.

# Typical use case

## Output Operation

/* Output pin configuration */
gpio_pin_config_t led_config =
{
kGpioDigitalOutput,
1,
};
/* Sets the configuration */
FGPIO_PinInit(FGPIO_LED, LED_PINNUM, &led_config);

## Input Operation

/* Input pin configuration */
PORT_SetPinInterruptConfig(BOARD_SW2_PORT, BOARD_SW2_FGPIO_PIN, kPORT_InterruptFallingEdge);
NVIC_EnableIRQ(BOARD_SW2_IRQ);
gpio_pin_config_t sw1_config =
{
kGpioDigitalInput,
0,
};
/* Sets the input pin configuration */
FGPIO_PinInit(FGPIO_SW1, SW1_PINNUM, &sw1_config);