Macros
GPIO Private Macros
Peripheral Driver » HAL Driver » GPIO » Defines

## Macros
#define | IS_GPIO_PIN_ACTION(__ACTION__) (((__ACTION__) == GPIO_PIN_RESET) || ((__ACTION__) == GPIO_PIN_SET))
| Check if GPIO pin action is valid. More...
#define | IS_GPIO_PIN(__PIN__)
| Check if GPIO pins are valid. More...
#define | IS_GPIO_MODE(__MODE__)
| Check if GPIO mode is valid. More...
#define | IS_GPIO_PULL(__PULL__)
| Check if GPIO pull type is valid. More...

## Detailed Description

## Macro Definition Documentation

## ◆ IS_GPIO_MODE

#define IS_GPIO_MODE | ( |  | __MODE__ | ) |

Value:
(((__MODE__) == GPIO_MODE_INPUT) ||\
((__MODE__) == GPIO_MODE_OUTPUT) ||\
((__MODE__) == GPIO_MODE_MUX) ||\
((__MODE__) == GPIO_MODE_IT_RISING) ||\
((__MODE__) == GPIO_MODE_IT_FALLING) ||\
((__MODE__) == GPIO_MODE_IT_HIGH) ||\
((__MODE__) == GPIO_MODE_IT_LOW) ||\
((__MODE__) == GPIO_MODE_IT_BOTH_EDGE))

Check if GPIO mode is valid.

Parameters

  __MODE__ | GPIO mode.

Return values

  SET | (__MODE__ is valid) or RESET (__MODE__ is invalid)

Definition at line 306 of file hal_gpio.h.

## ◆ IS_GPIO_PIN

#define IS_GPIO_PIN | ( |  | __PIN__ | ) |

Value:
((((__PIN__) & GPIO_PIN_MASK) != 0x00U) &&\
(((__PIN__) & ~GPIO_PIN_MASK) == 0x00U))

Check if GPIO pins are valid.

Parameters

  __PIN__ | GPIO pins.

Return values

  SET | (__PIN__ is valid) or RESET (__PIN__ is invalid)

Definition at line 297 of file hal_gpio.h.

## ◆ IS_GPIO_PIN_ACTION

#define IS_GPIO_PIN_ACTION | ( |  | __ACTION__ | ) | (((__ACTION__) == GPIO_PIN_RESET) || ((__ACTION__) == GPIO_PIN_SET))

Check if GPIO pin action is valid.

Parameters

  __ACTION__ | GPIO pin action.

Return values

  SET | (__ACTION__ is valid) or RESET (__ACTION__ is invalid)

Definition at line 290 of file hal_gpio.h.

## ◆ IS_GPIO_PULL

#define IS_GPIO_PULL | ( |  | __PULL__ | ) |

Value:
(((__PULL__) == GPIO_NOPULL) ||\
((__PULL__) == GPIO_PULLUP) || \
((__PULL__) == GPIO_PULLDOWN))

Check if GPIO pull type is valid.

Parameters

  __PULL__ | GPIO pull type.

Return values

  SET | (__PULL__ is valid) or RESET (__PULL__ is invalid)

Definition at line 320 of file hal_gpio.h.

GPIO_PULLDOWN
#define GPIO_PULLDOWN
Definition: hal_gpio.h:211
GPIO_MODE_MUX
#define GPIO_MODE_MUX
Definition: hal_gpio.h:193
GPIO_MODE_INPUT
#define GPIO_MODE_INPUT
Definition: hal_gpio.h:191
GPIO_NOPULL
#define GPIO_NOPULL
Definition: hal_gpio.h:209
GPIO_PIN_MASK
#define GPIO_PIN_MASK
Definition: hal_gpio.h:165
GPIO_MODE_IT_BOTH_EDGE
#define GPIO_MODE_IT_BOTH_EDGE
Definition: hal_gpio.h:201
GPIO_MODE_IT_LOW
#define GPIO_MODE_IT_LOW
Definition: hal_gpio.h:200
GPIO_PULLUP
#define GPIO_PULLUP
Definition: hal_gpio.h:210
GPIO_MODE_IT_HIGH
#define GPIO_MODE_IT_HIGH
Definition: hal_gpio.h:199
GPIO_MODE_IT_RISING
#define GPIO_MODE_IT_RISING
Definition: hal_gpio.h:197
GPIO_MODE_OUTPUT
#define GPIO_MODE_OUTPUT
Definition: hal_gpio.h:192
GPIO_MODE_IT_FALLING
#define GPIO_MODE_IT_FALLING
Definition: hal_gpio.h:198