This section describes the programming interface of the FGPIO driver. The FGPIO driver configures the FGPIO module and provides a functional interface to build the GPIO application.
- Note
- FGPIO (Fast GPIO) is only available in a few MCUs. FGPIO and GPIO share the same peripheral but use different registers. FGPIO is closer to the core than the regular GPIO and it's faster to read and write.
Typical use case
Output Operation
{
kGpioDigitalOutput,
1,
};
FGPIO_PinInit(FGPIO_LED, LED_PINNUM, &led_config);
Input Operation
NVIC_EnableIRQ(BOARD_SW2_IRQ);
{
kGpioDigitalInput,
0,
};
FGPIO_PinInit(FGPIO_SW1, SW1_PINNUM, &sw1_config);