| NUC029FAE_BSP V3.02.000 The Board Support Package for NUC029FAE MCU

Modules | Macros
GPIO Exported Constants
NUC029FAE Device Driver » GPIO Driver
Collaboration diagram for GPIO Exported Constants:

## Modules
| GPIO Exported Functions

## Macros
#define | GPIO_PIN_MAX 8
#define | GPIO_PMD_INPUT 0x0UL
#define | GPIO_PMD_OUTPUT 0x1UL
#define | GPIO_PMD_OPEN_DRAIN 0x2UL
#define | GPIO_PMD_QUASI 0x3UL
#define | GPIO_INT_RISING 0x00010000UL
#define | GPIO_INT_FALLING 0x00000001UL
#define | GPIO_INT_BOTH_EDGE 0x00010001UL
#define | GPIO_INT_HIGH 0x01010000UL
#define | GPIO_INT_LOW 0x01000001UL
#define | GPIO_IMD_EDGE 0UL
#define | GPIO_IMD_LEVEL 1UL
#define | GPIO_DBNCECON_ICLK_ON 0x00000020UL
#define | GPIO_DBNCECON_ICLK_OFF 0x00000000UL
#define | GPIO_DBNCECON_DBCLKSRC_IRC10K 0x00000010UL
#define | GPIO_DBNCECON_DBCLKSRC_HCLK 0x00000000UL
#define | GPIO_DBNCECON_DBCLKSEL_1 0x00000000UL
#define | GPIO_DBNCECON_DBCLKSEL_2 0x00000001UL
#define | GPIO_DBNCECON_DBCLKSEL_4 0x00000002UL
#define | GPIO_DBNCECON_DBCLKSEL_8 0x00000003UL
#define | GPIO_DBNCECON_DBCLKSEL_16 0x00000004UL
#define | GPIO_DBNCECON_DBCLKSEL_32 0x00000005UL
#define | GPIO_DBNCECON_DBCLKSEL_64 0x00000006UL
#define | GPIO_DBNCECON_DBCLKSEL_128 0x00000007UL
#define | GPIO_DBNCECON_DBCLKSEL_256 0x00000008UL
#define | GPIO_DBNCECON_DBCLKSEL_512 0x00000009UL
#define | GPIO_DBNCECON_DBCLKSEL_1024 0x0000000AUL
#define | GPIO_DBNCECON_DBCLKSEL_2048 0x0000000BUL
#define | GPIO_DBNCECON_DBCLKSEL_4096 0x0000000CUL
#define | GPIO_DBNCECON_DBCLKSEL_8192 0x0000000DUL
#define | GPIO_DBNCECON_DBCLKSEL_16384 0x0000000EUL
#define | GPIO_DBNCECON_DBCLKSEL_32768 0x0000000FUL
#define | GPIO_PIN_ADDR(port, pin) (*((volatile uint32_t *)((GPIOBIT0_BASE+(0x20*(port))) + ((pin)<<2))))
#define | P00 GPIO_PIN_ADDR(0, 0)
#define | P01 GPIO_PIN_ADDR(0, 1)
#define | P02 GPIO_PIN_ADDR(0, 2)
#define | P03 GPIO_PIN_ADDR(0, 3)
#define | P04 GPIO_PIN_ADDR(0, 4)
#define | P05 GPIO_PIN_ADDR(0, 5)
#define | P06 GPIO_PIN_ADDR(0, 6)
#define | P07 GPIO_PIN_ADDR(0, 7)
#define | P10 GPIO_PIN_ADDR(1, 0)
#define | P11 GPIO_PIN_ADDR(1, 1)
#define | P12 GPIO_PIN_ADDR(1, 2)
#define | P13 GPIO_PIN_ADDR(1, 3)
#define | P14 GPIO_PIN_ADDR(1, 4)
#define | P15 GPIO_PIN_ADDR(1, 5)
#define | P16 GPIO_PIN_ADDR(1, 6)
#define | P17 GPIO_PIN_ADDR(1, 7)
#define | P20 GPIO_PIN_ADDR(2, 0)
#define | P21 GPIO_PIN_ADDR(2, 1)
#define | P22 GPIO_PIN_ADDR(2, 2)
#define | P23 GPIO_PIN_ADDR(2, 3)
#define | P24 GPIO_PIN_ADDR(2, 4)
#define | P25 GPIO_PIN_ADDR(2, 5)
#define | P26 GPIO_PIN_ADDR(2, 6)
#define | P27 GPIO_PIN_ADDR(2, 7)
#define | P30 GPIO_PIN_ADDR(3, 0)
#define | P31 GPIO_PIN_ADDR(3, 1)
#define | P32 GPIO_PIN_ADDR(3, 2)
#define | P33 GPIO_PIN_ADDR(3, 3)
#define | P34 GPIO_PIN_ADDR(3, 4)
#define | P35 GPIO_PIN_ADDR(3, 5)
#define | P36 GPIO_PIN_ADDR(3, 6)
#define | P37 GPIO_PIN_ADDR(3, 7)
#define | P40 GPIO_PIN_ADDR(4, 0)
#define | P41 GPIO_PIN_ADDR(4, 1)
#define | P42 GPIO_PIN_ADDR(4, 2)
#define | P43 GPIO_PIN_ADDR(4, 3)
#define | P44 GPIO_PIN_ADDR(4, 4)
#define | P45 GPIO_PIN_ADDR(4, 5)
#define | P46 GPIO_PIN_ADDR(4, 6)
#define | P47 GPIO_PIN_ADDR(4, 7)
#define | P50 GPIO_PIN_ADDR(5, 0)
#define | P51 GPIO_PIN_ADDR(5, 1)
#define | P52 GPIO_PIN_ADDR(5, 2)
#define | P53 GPIO_PIN_ADDR(5, 3)
#define | P54 GPIO_PIN_ADDR(5, 4)
#define | P55 GPIO_PIN_ADDR(5, 5)

## Detailed Description

## Macro Definition Documentation

## ◆ GPIO_DBNCECON_DBCLKSEL_1

#define GPIO_DBNCECON_DBCLKSEL_1 0x00000000UL

DBNCECON setting for sampling cycle = 1 clocks

Definition at line 66 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_1024

#define GPIO_DBNCECON_DBCLKSEL_1024 0x0000000AUL

DBNCECON setting for sampling cycle = 1024 clocks

Definition at line 76 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_128

#define GPIO_DBNCECON_DBCLKSEL_128 0x00000007UL

DBNCECON setting for sampling cycle = 128 clocks

Definition at line 73 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_16

#define GPIO_DBNCECON_DBCLKSEL_16 0x00000004UL

DBNCECON setting for sampling cycle = 16 clocks

Definition at line 70 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_16384

#define GPIO_DBNCECON_DBCLKSEL_16384 0x0000000EUL

DBNCECON setting for sampling cycle = 16384 clocks

Definition at line 80 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_2

#define GPIO_DBNCECON_DBCLKSEL_2 0x00000001UL

DBNCECON setting for sampling cycle = 2 clocks

Definition at line 67 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_2048

#define GPIO_DBNCECON_DBCLKSEL_2048 0x0000000BUL

DBNCECON setting for sampling cycle = 2048 clocks

Definition at line 77 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_256

#define GPIO_DBNCECON_DBCLKSEL_256 0x00000008UL

DBNCECON setting for sampling cycle = 256 clocks

Definition at line 74 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_32

#define GPIO_DBNCECON_DBCLKSEL_32 0x00000005UL

DBNCECON setting for sampling cycle = 32 clocks

Definition at line 71 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_32768

#define GPIO_DBNCECON_DBCLKSEL_32768 0x0000000FUL

DBNCECON setting for sampling cycle = 32768 clocks

Definition at line 81 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_4

#define GPIO_DBNCECON_DBCLKSEL_4 0x00000002UL

DBNCECON setting for sampling cycle = 4 clocks

Definition at line 68 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_4096

#define GPIO_DBNCECON_DBCLKSEL_4096 0x0000000CUL

DBNCECON setting for sampling cycle = 4096 clocks

Definition at line 78 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_512

#define GPIO_DBNCECON_DBCLKSEL_512 0x00000009UL

DBNCECON setting for sampling cycle = 512 clocks

Definition at line 75 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_64

#define GPIO_DBNCECON_DBCLKSEL_64 0x00000006UL

DBNCECON setting for sampling cycle = 64 clocks

Definition at line 72 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_8

#define GPIO_DBNCECON_DBCLKSEL_8 0x00000003UL

DBNCECON setting for sampling cycle = 8 clocks

Definition at line 69 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSEL_8192

#define GPIO_DBNCECON_DBCLKSEL_8192 0x0000000DUL

DBNCECON setting for sampling cycle = 8192 clocks

Definition at line 79 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSRC_HCLK

#define GPIO_DBNCECON_DBCLKSRC_HCLK 0x00000000UL

DBNCECON setting for de-bounce counter clock source is the internal HCLK

Definition at line 64 of file gpio.h.

## ◆ GPIO_DBNCECON_DBCLKSRC_IRC10K

#define GPIO_DBNCECON_DBCLKSRC_IRC10K 0x00000010UL

DBNCECON setting for de-bounce counter clock source is the internal 10 kHz

Definition at line 63 of file gpio.h.

## ◆ GPIO_DBNCECON_ICLK_OFF

#define GPIO_DBNCECON_ICLK_OFF 0x00000000UL

DBNCECON setting for edge detection circuit is active only if IO pin corresponding GPIOx_IEN bit is set to 1

Definition at line 61 of file gpio.h.

## ◆ GPIO_DBNCECON_ICLK_ON

#define GPIO_DBNCECON_ICLK_ON 0x00000020UL

DBNCECON setting for all IO pins edge detection circuit is always active after reset

Definition at line 60 of file gpio.h.

## ◆ GPIO_IMD_EDGE

#define GPIO_IMD_EDGE 0UL

IMD Setting for Edge Trigger Mode

Definition at line 54 of file gpio.h.

## ◆ GPIO_IMD_LEVEL

#define GPIO_IMD_LEVEL 1UL

IMD Setting for Edge Level Mode

Definition at line 55 of file gpio.h.

## ◆ GPIO_INT_BOTH_EDGE

#define GPIO_INT_BOTH_EDGE 0x00010001UL

Interrupt enable by both Rising Edge and Falling Edge

Definition at line 47 of file gpio.h.

## ◆ GPIO_INT_FALLING

#define GPIO_INT_FALLING 0x00000001UL

Interrupt enable by Input Falling Edge

Definition at line 46 of file gpio.h.

## ◆ GPIO_INT_HIGH

#define GPIO_INT_HIGH 0x01010000UL

Interrupt enable by Level-High

Definition at line 48 of file gpio.h.

## ◆ GPIO_INT_LOW

#define GPIO_INT_LOW 0x01000001UL

Interrupt enable by Level-Level

Definition at line 49 of file gpio.h.

## ◆ GPIO_INT_RISING

#define GPIO_INT_RISING 0x00010000UL

Interrupt enable by Input Rising Edge

Definition at line 45 of file gpio.h.

## ◆ GPIO_PIN_ADDR

#define GPIO_PIN_ADDR | ( |  | port,
|  |  | pin
| ) |  | (*((volatile uint32_t *)((GPIOBIT0_BASE+(0x20*(port))) + ((pin)<<2))))

Define GPIO Pin Data Input/Output. It could be used to control each I/O pin by pin address mapping. Example 1:

    P00 = 1;

It is used to set P0.0 to high;

Example 2:

    if (P00)
        P00 = 0;

If P0.0 pin status is high, then set P0.0 data output to low.

Definition at line 97 of file gpio.h.

## ◆ GPIO_PIN_MAX

#define GPIO_PIN_MAX 8

Specify Maximum Pins of Each GPIO Port

Definition at line 32 of file gpio.h.

## ◆ GPIO_PMD_INPUT

#define GPIO_PMD_INPUT 0x0UL

Input Mode

Definition at line 37 of file gpio.h.

## ◆ GPIO_PMD_OPEN_DRAIN

#define GPIO_PMD_OPEN_DRAIN 0x2UL

Open-Drain Mode

Definition at line 39 of file gpio.h.

## ◆ GPIO_PMD_OUTPUT

#define GPIO_PMD_OUTPUT 0x1UL

Output Mode

Definition at line 38 of file gpio.h.

## ◆ GPIO_PMD_QUASI

#define GPIO_PMD_QUASI 0x3UL

Quasi-bidirectional Mode

Definition at line 40 of file gpio.h.

## ◆ P00

#define P00 GPIO_PIN_ADDR(0, 0)

Specify P00 Pin Data Input/Output

Definition at line 98 of file gpio.h.

## ◆ P01

#define P01 GPIO_PIN_ADDR(0, 1)

Specify P01 Pin Data Input/Output

Definition at line 99 of file gpio.h.

## ◆ P02

#define P02 GPIO_PIN_ADDR(0, 2)

Specify P02 Pin Data Input/Output

Definition at line 100 of file gpio.h.

## ◆ P03

#define P03 GPIO_PIN_ADDR(0, 3)

Specify P03 Pin Data Input/Output

Definition at line 101 of file gpio.h.

## ◆ P04

#define P04 GPIO_PIN_ADDR(0, 4)

Specify P04 Pin Data Input/Output

Definition at line 102 of file gpio.h.

## ◆ P05

#define P05 GPIO_PIN_ADDR(0, 5)

Specify P05 Pin Data Input/Output

Definition at line 103 of file gpio.h.

## ◆ P06

#define P06 GPIO_PIN_ADDR(0, 6)

Specify P06 Pin Data Input/Output

Definition at line 104 of file gpio.h.

## ◆ P07

#define P07 GPIO_PIN_ADDR(0, 7)

Specify P07 Pin Data Input/Output

Definition at line 105 of file gpio.h.

## ◆ P10

#define P10 GPIO_PIN_ADDR(1, 0)

Specify P10 Pin Data Input/Output

Definition at line 106 of file gpio.h.

## ◆ P11

#define P11 GPIO_PIN_ADDR(1, 1)

Specify P11 Pin Data Input/Output

Definition at line 107 of file gpio.h.

## ◆ P12

#define P12 GPIO_PIN_ADDR(1, 2)

Specify P12 Pin Data Input/Output

Definition at line 108 of file gpio.h.

## ◆ P13

#define P13 GPIO_PIN_ADDR(1, 3)

Specify P13 Pin Data Input/Output

Definition at line 109 of file gpio.h.

## ◆ P14

#define P14 GPIO_PIN_ADDR(1, 4)

Specify P14 Pin Data Input/Output

Definition at line 110 of file gpio.h.

## ◆ P15

#define P15 GPIO_PIN_ADDR(1, 5)

Specify P15 Pin Data Input/Output

Definition at line 111 of file gpio.h.

## ◆ P16

#define P16 GPIO_PIN_ADDR(1, 6)

Specify P16 Pin Data Input/Output

Definition at line 112 of file gpio.h.

## ◆ P17

#define P17 GPIO_PIN_ADDR(1, 7)

Specify P17 Pin Data Input/Output

Definition at line 113 of file gpio.h.

## ◆ P20

#define P20 GPIO_PIN_ADDR(2, 0)

Specify P20 Pin Data Input/Output

Definition at line 114 of file gpio.h.

## ◆ P21

#define P21 GPIO_PIN_ADDR(2, 1)

Specify P21 Pin Data Input/Output

Definition at line 115 of file gpio.h.

## ◆ P22

#define P22 GPIO_PIN_ADDR(2, 2)

Specify P22 Pin Data Input/Output

Definition at line 116 of file gpio.h.

## ◆ P23

#define P23 GPIO_PIN_ADDR(2, 3)

Specify P23 Pin Data Input/Output

Definition at line 117 of file gpio.h.

## ◆ P24

#define P24 GPIO_PIN_ADDR(2, 4)

Specify P24 Pin Data Input/Output

Definition at line 118 of file gpio.h.

## ◆ P25

#define P25 GPIO_PIN_ADDR(2, 5)

Specify P25 Pin Data Input/Output

Definition at line 119 of file gpio.h.

## ◆ P26

#define P26 GPIO_PIN_ADDR(2, 6)

Specify P26 Pin Data Input/Output

Definition at line 120 of file gpio.h.

## ◆ P27

#define P27 GPIO_PIN_ADDR(2, 7)

Specify P27 Pin Data Input/Output

Definition at line 121 of file gpio.h.

## ◆ P30

#define P30 GPIO_PIN_ADDR(3, 0)

Specify P30 Pin Data Input/Output

Definition at line 122 of file gpio.h.

## ◆ P31

#define P31 GPIO_PIN_ADDR(3, 1)

Specify P31 Pin Data Input/Output

Definition at line 123 of file gpio.h.

## ◆ P32

#define P32 GPIO_PIN_ADDR(3, 2)

Specify P32 Pin Data Input/Output

Definition at line 124 of file gpio.h.

## ◆ P33

#define P33 GPIO_PIN_ADDR(3, 3)

Specify P33 Pin Data Input/Output

Definition at line 125 of file gpio.h.

## ◆ P34

#define P34 GPIO_PIN_ADDR(3, 4)

Specify P34 Pin Data Input/Output

Definition at line 126 of file gpio.h.

## ◆ P35

#define P35 GPIO_PIN_ADDR(3, 5)

Specify P35 Pin Data Input/Output

Definition at line 127 of file gpio.h.

## ◆ P36

#define P36 GPIO_PIN_ADDR(3, 6)

Specify P36 Pin Data Input/Output

Definition at line 128 of file gpio.h.

## ◆ P37

#define P37 GPIO_PIN_ADDR(3, 7)

Specify P37 Pin Data Input/Output

Definition at line 129 of file gpio.h.

## ◆ P40

#define P40 GPIO_PIN_ADDR(4, 0)

Specify P40 Pin Data Input/Output

Definition at line 130 of file gpio.h.

## ◆ P41

#define P41 GPIO_PIN_ADDR(4, 1)

Specify P41 Pin Data Input/Output

Definition at line 131 of file gpio.h.

## ◆ P42

#define P42 GPIO_PIN_ADDR(4, 2)

Specify P42 Pin Data Input/Output

Definition at line 132 of file gpio.h.

## ◆ P43

#define P43 GPIO_PIN_ADDR(4, 3)

Specify P43 Pin Data Input/Output

Definition at line 133 of file gpio.h.

## ◆ P44

#define P44 GPIO_PIN_ADDR(4, 4)

Specify P44 Pin Data Input/Output

Definition at line 134 of file gpio.h.

## ◆ P45

#define P45 GPIO_PIN_ADDR(4, 5)

Specify P45 Pin Data Input/Output

Definition at line 135 of file gpio.h.

## ◆ P46

#define P46 GPIO_PIN_ADDR(4, 6)

Specify P46 Pin Data Input/Output

Definition at line 136 of file gpio.h.

## ◆ P47

#define P47 GPIO_PIN_ADDR(4, 7)

Specify P47 Pin Data Input/Output

Definition at line 137 of file gpio.h.

## ◆ P50

#define P50 GPIO_PIN_ADDR(5, 0)

Specify P50 Pin Data Input/Output

Definition at line 138 of file gpio.h.

## ◆ P51

#define P51 GPIO_PIN_ADDR(5, 1)

Specify P51 Pin Data Input/Output

Definition at line 139 of file gpio.h.

## ◆ P52

#define P52 GPIO_PIN_ADDR(5, 2)

Specify P52 Pin Data Input/Output

Definition at line 140 of file gpio.h.

## ◆ P53

#define P53 GPIO_PIN_ADDR(5, 3)

Specify P53 Pin Data Input/Output

Definition at line 141 of file gpio.h.

## ◆ P54

#define P54 GPIO_PIN_ADDR(5, 4)

Specify P54 Pin Data Input/Output

Definition at line 142 of file gpio.h.

## ◆ P55

#define P55 GPIO_PIN_ADDR(5, 5)

Specify P55 Pin Data Input/Output

Definition at line 143 of file gpio.h.