123#define GPIO_PIN_ADDR(Port, Pin) (*((volatile uint32_t *)((GPIOBIT0_BASE+(0x20*(Port))) + ((Pin)<<2))))
124#define P00 GPIO_PIN_ADDR(0, 0)
125#define P01 GPIO_PIN_ADDR(0, 1)
126#define P02 GPIO_PIN_ADDR(0, 2)
127#define P03 GPIO_PIN_ADDR(0, 3)
128#define P04 GPIO_PIN_ADDR(0, 4)
129#define P05 GPIO_PIN_ADDR(0, 5)
130#define P06 GPIO_PIN_ADDR(0, 6)
131#define P07 GPIO_PIN_ADDR(0, 7)
132#define P10 GPIO_PIN_ADDR(1, 0)
133#define P11 GPIO_PIN_ADDR(1, 1)
134#define P12 GPIO_PIN_ADDR(1, 2)
135#define P13 GPIO_PIN_ADDR(1, 3)
136#define P14 GPIO_PIN_ADDR(1, 4)
137#define P15 GPIO_PIN_ADDR(1, 5)
138#define P16 GPIO_PIN_ADDR(1, 6)
139#define P17 GPIO_PIN_ADDR(1, 7)
140#define P20 GPIO_PIN_ADDR(2, 0)
141#define P21 GPIO_PIN_ADDR(2, 1)
142#define P22 GPIO_PIN_ADDR(2, 2)
143#define P23 GPIO_PIN_ADDR(2, 3)
144#define P24 GPIO_PIN_ADDR(2, 4)
145#define P25 GPIO_PIN_ADDR(2, 5)
146#define P26 GPIO_PIN_ADDR(2, 6)
147#define P27 GPIO_PIN_ADDR(2, 7)
148#define P30 GPIO_PIN_ADDR(3, 0)
149#define P31 GPIO_PIN_ADDR(3, 1)
150#define P32 GPIO_PIN_ADDR(3, 2)
151#define P33 GPIO_PIN_ADDR(3, 3)
152#define P34 GPIO_PIN_ADDR(3, 4)
153#define P35 GPIO_PIN_ADDR(3, 5)
154#define P36 GPIO_PIN_ADDR(3, 6)
155#define P37 GPIO_PIN_ADDR(3, 7)
156#define P40 GPIO_PIN_ADDR(4, 0)
157#define P41 GPIO_PIN_ADDR(4, 1)
158#define P42 GPIO_PIN_ADDR(4, 2)
159#define P43 GPIO_PIN_ADDR(4, 3)
160#define P44 GPIO_PIN_ADDR(4, 4)
161#define P45 GPIO_PIN_ADDR(4, 5)
162#define P46 GPIO_PIN_ADDR(4, 6)
163#define P47 GPIO_PIN_ADDR(4, 7)
164#define P50 GPIO_PIN_ADDR(5, 0)
165#define P51 GPIO_PIN_ADDR(5, 1)
166#define P52 GPIO_PIN_ADDR(5, 2)
167#define P53 GPIO_PIN_ADDR(5, 3)
168#define P54 GPIO_PIN_ADDR(5, 4)
169#define P55 GPIO_PIN_ADDR(5, 5)
170#define P56 GPIO_PIN_ADDR(5, 6)
171#define P57 GPIO_PIN_ADDR(5, 7)
187 gpio->INTSRC = PinMask;
202 gpio->INTSRC = gpio->INTSRC;
217 gpio->DBEN &= ~PinMask;
232 gpio->DBEN |= PinMask;
247 gpio->DINOFF |= (PinMask << 16);
262 gpio->DINOFF &= ~(PinMask << 16);
277 gpio->DINOFF &= ~PinMask;
292 gpio->DINOFF |= PinMask;
307 gpio->DINOFF &= ~(PinMask << 8);
322 gpio->DINOFF |= (PinMask << 8);
337 gpio->DATMSK &= ~PinMask;
352 gpio->DATMSK |= PinMask;
368 return (
bool)(gpio->INTSRC & PinMask);
392 GPIO->DBCTL = GP_DBCTL_ICLKON_Msk | ClkSrc | ClkSel;
448__STATIC_INLINE
void GPIO_Toggle(GPIO_T *gpio, uint32_t u32PinMask)
488 gpio->INTTYPE |= (((IntAttribs >> 24) & 0xFFUL) << Pin);
489 gpio->INTEN |= ((IntAttribs & 0xFFFFFFUL) << Pin);
504 gpio->INTTYPE &= ~(1UL << Pin);
505 gpio->INTEN &= ~((0x00010001UL) << Pin);
520#define GPIO_EnableEINT0 GPIO_EnableInt
533#define GPIO_DisableEINT0 GPIO_DisableInt
548#define GPIO_EnableEINT1 GPIO_EnableInt
561#define GPIO_DisableEINT1 GPIO_DisableInt
enum _GPIO_ClkSelDef GPIO_ClkSelDef
_GPIO_ClkSelDef
Definition: pan_gpio.h:79
@ GPIO_DBCTL_DBCLKSEL_1
Definition: pan_gpio.h:80
@ GPIO_DBCTL_DBCLKSEL_128
Definition: pan_gpio.h:87
@ GPIO_DBCTL_DBCLKSEL_8192
Definition: pan_gpio.h:93
@ GPIO_DBCTL_DBCLKSEL_8
Definition: pan_gpio.h:83
@ GPIO_DBCTL_DBCLKSEL_2048
Definition: pan_gpio.h:91
@ GPIO_DBCTL_DBCLKSEL_16384
Definition: pan_gpio.h:94
@ GPIO_DBCTL_DBCLKSEL_256
Definition: pan_gpio.h:88
@ GPIO_DBCTL_DBCLKSEL_32
Definition: pan_gpio.h:85
@ GPIO_DBCTL_DBCLKSEL_4
Definition: pan_gpio.h:82
@ GPIO_DBCTL_DBCLKSEL_2
Definition: pan_gpio.h:81
@ GPIO_DBCTL_DBCLKSEL_16
Definition: pan_gpio.h:84
@ GPIO_DBCTL_DBCLKSEL_4096
Definition: pan_gpio.h:92
@ GPIO_DBCTL_DBCLKSEL_32768
Definition: pan_gpio.h:95
@ GPIO_DBCTL_DBCLKSEL_1024
Definition: pan_gpio.h:90
@ GPIO_DBCTL_DBCLKSEL_512
Definition: pan_gpio.h:89
@ GPIO_DBCTL_DBCLKSEL_64
Definition: pan_gpio.h:86
_GPIO_ClkSrcDef
Definition: pan_gpio.h:67
enum _GPIO_ClkSrcDef GPIO_ClkSrcDef
@ GPIO_DBCTL_DBCLKSRC_HCLK
Definition: pan_gpio.h:69
@ GPIO_DBCTL_DBCLKSRC_RCL
Definition: pan_gpio.h:68
_GPIO_IntAttrDef
Definition: pan_gpio.h:52
enum _GPIO_IntAttrDef GPIO_IntAttrDef
@ GPIO_INT_BOTH_EDGE
Definition: pan_gpio.h:55
@ GPIO_INT_RISING
Definition: pan_gpio.h:53
@ GPIO_INT_FALLING
Definition: pan_gpio.h:54
@ GPIO_INT_HIGH
Definition: pan_gpio.h:56
@ GPIO_INT_LOW
Definition: pan_gpio.h:57
_GPIO_ModeDef
Definition: pan_gpio.h:39
enum _GPIO_ModeDef GPIO_ModeDef
@ GPIO_MODE_OPEN_DRAIN
Definition: pan_gpio.h:42
@ GPIO_MODE_INPUT
Definition: pan_gpio.h:40
@ GPIO_MODE_OUTPUT
Definition: pan_gpio.h:41
@ GPIO_MODE_QUASI
Definition: pan_gpio.h:43
void GPIO_SetMode(GPIO_T *gpio, uint32_t PinMask, GPIO_ModeDef Mode)
Set GPIO Work Mode.
__STATIC_INLINE void GPIO_DisableDoutMask(GPIO_T *gpio, uint32_t PinMask)
Disable I/O DOUT mask.
Definition: pan_gpio.h:335
__STATIC_INLINE void GPIO_EnableDoutMask(GPIO_T *gpio, uint32_t PinMask)
Enable I/O DOUT mask.
Definition: pan_gpio.h:350
__STATIC_INLINE void GPIO_TogglePin(uint32_t u32Pin)
Toggle Specified GPIO pin.
Definition: pan_gpio.h:465
__STATIC_INLINE void GPIO_SetOutData(GPIO_T *gpio, uint32_t data)
Set GPIO Port OUT Data.
Definition: pan_gpio.h:419
__STATIC_INLINE void GPIO_SetDebounceTime(GPIO_ClkSrcDef ClkSrc, GPIO_ClkSelDef ClkSel)
Set De-bounce Sampling Cycle Time.
Definition: pan_gpio.h:390
__STATIC_INLINE void GPIO_DisableDebounce(GPIO_T *gpio, uint32_t PinMask)
Disable Pin De-bounce Function.
Definition: pan_gpio.h:215
__STATIC_INLINE void GPIO_ClrIntFlag(GPIO_T *gpio, uint32_t PinMask)
Clear GPIO Pin Interrupt Flag.
Definition: pan_gpio.h:185
__STATIC_INLINE void GPIO_EnablePulldownPath(GPIO_T *gpio, uint32_t PinMask)
Enable I/O Digital pull down Path.
Definition: pan_gpio.h:320
__STATIC_INLINE void GPIO_DisableInt(GPIO_T *gpio, uint32_t Pin)
Disable GPIO interrupt.
Definition: pan_gpio.h:502
__STATIC_INLINE void GPIO_Toggle(GPIO_T *gpio, uint32_t u32PinMask)
Toggle Specified GPIO pin.
Definition: pan_gpio.h:448
__STATIC_INLINE bool GPIO_GetIntFlag(GPIO_T *gpio, uint32_t PinMask)
Get GPIO Pin Interrupt Flag.
Definition: pan_gpio.h:366
__STATIC_INLINE uint32_t GPIO_GetInData(GPIO_T *gpio)
Get GPIO Port IN Data.
Definition: pan_gpio.h:404
__STATIC_INLINE void GPIO_EnablePullupPath(GPIO_T *gpio, uint32_t PinMask)
Enable I/O Digital pull up Path.
Definition: pan_gpio.h:290
__STATIC_INLINE void GPIO_DisablePulldownPath(GPIO_T *gpio, uint32_t PinMask)
Disable I/O Digital pull down Path.
Definition: pan_gpio.h:305
__STATIC_INLINE void GPIO_DisableDigitalPath(GPIO_T *gpio, uint32_t PinMask)
Disable I/O Digital Input Path.
Definition: pan_gpio.h:245
__STATIC_INLINE void GPIO_EnableDigitalPath(GPIO_T *gpio, uint32_t PinMask)
Enable I/O Digital Input Path.
Definition: pan_gpio.h:260
__STATIC_INLINE void GPIO_ClrAllIntFlag(GPIO_T *gpio)
Clear GPIO Pin Interrupt Flag.
Definition: pan_gpio.h:200
__STATIC_INLINE void GPIO_DisablePullupPath(GPIO_T *gpio, uint32_t PinMask)
Disable I/O Digital pull up Path.
Definition: pan_gpio.h:275
__STATIC_INLINE void GPIO_EnableDebounce(GPIO_T *gpio, uint32_t PinMask)
Enable Pin De-bounce Function.
Definition: pan_gpio.h:230
__STATIC_INLINE void GPIO_EnableInt(GPIO_T *gpio, uint32_t Pin, GPIO_IntAttrDef IntAttribs)
Enable GPIO interrupt.
Definition: pan_gpio.h:486
__STATIC_INLINE uint32_t GPIO_GetOutData(GPIO_T *gpio)
Get GPIO Port OUT Data.
Definition: pan_gpio.h:433