34 #include "fsl_common.h" 45 #define FSL_GPIO_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 48 typedef enum _gpio_pin_direction 62 typedef struct _gpio_pin_config
72 #if defined(__cplusplus) 128 base->PCOR = 1 << pin;
132 base->PSOR = 1 << pin;
184 return (((base->PDIR) >> pin) & 0x01U);
227 #if defined(FSL_FEATURE_SOC_FGPIO_COUNT) && FSL_FEATURE_SOC_FGPIO_COUNT 290 base->PCOR = 1 << pin;
294 base->PSOR = 1 << pin;
346 return (((base->PDIR) >> pin) & 0x01U);
384 #if defined(__cplusplus) void GPIO_ClearPinsInterruptFlags(GPIO_Type *base, uint32_t mask)
Clears multiple GPIO pins' interrupt status flag.
Definition: fsl_gpio.c:97
gpio_pin_direction_t
GPIO direction definition.
Definition: fsl_gpio.h:48
static void FGPIO_TogglePinsOutput(FGPIO_Type *base, uint32_t mask)
Reverses current output logic of the multiple FGPIO pins.
Definition: fsl_gpio.h:324
static void FGPIO_ClearPinsOutput(FGPIO_Type *base, uint32_t mask)
Sets the output level of the multiple FGPIO pins to the logic 0.
Definition: fsl_gpio.h:314
static uint32_t FGPIO_ReadPinInput(FGPIO_Type *base, uint32_t pin)
Reads the current input value of the whole FGPIO port.
Definition: fsl_gpio.h:344
static void FGPIO_SetPinsOutput(FGPIO_Type *base, uint32_t mask)
Sets the output level of the multiple FGPIO pins to the logic 1.
Definition: fsl_gpio.h:304
uint32_t GPIO_GetPinsInterruptFlags(GPIO_Type *base)
Reads whole GPIO port interrupt status flag.
Definition: fsl_gpio.c:88
gpio_pin_direction_t pinDirection
Definition: fsl_gpio.h:64
static void FGPIO_WritePinOutput(FGPIO_Type *base, uint32_t pin, uint8_t output)
Sets the output level of the multiple FGPIO pins to the logic 1 or 0.
Definition: fsl_gpio.h:286
Definition: fsl_gpio.h:50
void FGPIO_ClearPinsInterruptFlags(FGPIO_Type *base, uint32_t mask)
Clears the multiple FGPIO pins' interrupt status flag.
Definition: fsl_gpio.c:170
static void GPIO_WritePinOutput(GPIO_Type *base, uint32_t pin, uint8_t output)
Sets the output level of the multiple GPIO pins to the logic 1 or 0.
Definition: fsl_gpio.h:124
void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)
Initializes a GPIO pin used by the board.
Definition: fsl_gpio.c:73
static uint32_t GPIO_ReadPinInput(GPIO_Type *base, uint32_t pin)
Reads the current input value of the whole GPIO port.
Definition: fsl_gpio.h:182
Definition: fsl_gpio.h:51
uint8_t outputLogic
Definition: fsl_gpio.h:66
void FGPIO_PinInit(FGPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)
Initializes a FGPIO pin used by the board.
Definition: fsl_gpio.c:146
static void GPIO_ClearPinsOutput(GPIO_Type *base, uint32_t mask)
Sets the output level of the multiple GPIO pins to the logic 0.
Definition: fsl_gpio.h:152
static void GPIO_SetPinsOutput(GPIO_Type *base, uint32_t mask)
Sets the output level of the multiple GPIO pins to the logic 1.
Definition: fsl_gpio.h:142
static void GPIO_TogglePinsOutput(GPIO_Type *base, uint32_t mask)
Reverses current output logic of the multiple GPIO pins.
Definition: fsl_gpio.h:162
uint32_t FGPIO_GetPinsInterruptFlags(FGPIO_Type *base)
Reads the whole FGPIO port interrupt status flag.
Definition: fsl_gpio.c:161
The GPIO pin configuration structure.
Definition: fsl_gpio.h:62