NANO100_BSP V3.04.002
The Board Support Package for Nano100BN Series
NuEdu-Basic01_Interrupt.c
Go to the documentation of this file.
1/**************************************************************************/
12#include <stdio.h>
13#include "NUC200Series.h"
15
16
34{
35 /* Set PB.15 as Input */
36 _GPIO_SET_PIN_MODE(PB, 15, GPIO_PMD_INPUT);
37
38 /* Set PB.15 multi-function pins for EINT1 */
39 SYS->GPB_MFP |= SYS_GPB_MFP_PB15_INT1;
40}
41
46void Open_EINT1(void)
47{
49
50 /* Enable interrupt by falling edge trigger */
52 NVIC_EnableIRQ(EINT1_IRQn);
53
54}
55
56 /* end of group Nano130_Basic01_FUNCTIONS Interrupt Exported Functions */
58 /* end of group NuEdu-SDK-Nano130_Basic01 Nano130_Basic01 Library */
60 /* end of group NANO100_Library NANO100 Library */
62
63/*** (C) COPYRIGHT 2014 Nuvoton Technology Corp. ***/
NuEdu-Basic01_Interrupt.h interrupt driver header file for NuEdu-SDK-Nano130.
@ EINT1_IRQn
Definition: Nano100Series.h:93
#define GPIO_PMD_INPUT
Definition: gpio.h:37
#define GPIO_INT_FALLING
Definition: gpio.h:45
void GPIO_EnableInt(GPIO_T *gpio, uint32_t u32Pin, uint32_t u32IntAttribs)
Enable GPIO interrupt.
Definition: gpio.c:65
#define PB
Pointer to GPIO port B register structure.
#define SYS
Pointer to SYS register structure.
void Open_EINT1(void)
This function enables EINT1 interrupt and IRQ handler, and configs trigger condition for falling edge...
void Initial_EINT1_GPIO(void)
This function initializes PB.15 multi-function for EINT1 to detect external interrupt.