/* enable and set key EXTI interrupt to the lowest priority */ nvic_irq_enable(EXTI0_1_IRQn, 2U); #elif defined GD32F4XX nvic_irq_enable(EXTI0_IRQn, 2U,0U); #elif defined GD32F1X0 || GD32F3X0 nvic_irq_enable(EXTI0_1_IRQn, 2U,0U); #endif /* connect key EXTI line to ...
rcu_periph_clock_enable(RCU_AF); /* connect port to USARTx_Tx */ gpio_init(GPIOA, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_9); /* connect port to USARTx_Rx */ gpio_init(GPIOA, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, GPIO_PIN_10); nvic_irq_enable(USART0_IRQn, 2U,...
/* enable and set key EXTI interrupt to the lowest priority */ nvic_irq_enable(EXTI0_1_IRQn, 2U); #elif defined GD32F4XX nvic_irq_enable(EXTI0_IRQn, 2U,0U); #elif defined GD32F1X0 || GD32F3X0 nvic_irq_enable(EXTI0_1_IRQn, 2U,0U); #endif /* connect key EXTI line to ...
1、开始串口中断的时候会死机:nvic_irq_enable(USART0_IRQn, 3, 0);解决:要设置中断优先级分组:nv...
nvic_irq_enable 函数原型 nvic_irq_enable()函数的参数说明表 参数nvic_irq是一个枚举变量,它定义了...
nvic_irq_enable(SPI0_IRQn,0,1); 有关这两个函数的原型以及函数参数的说明,请见代码清单nvic_priority_group_set函数原型、参数nvic_prigroup说明表、代码清单nvic_irq_enable函数原型、nvic_irq_enable()函数的参数说明表。 代码清单nvic_priority_group_set 函数原型 ...
nvic_irq_enable(EXTI0_1_IRQn, 2U);#elif defined GD32F4XX nvic_irq_enable(EXTI0_IRQn, 2U,0...
nvic_irq_enable(EXTI1_IRQn,0,0);bsp_uart_init(&BOARD_UART);delay_ms(1000); printf_log("Example of key interrupt detection.\r\n");while (1){if(USER_KEY.press_timerms == PRESS_DOWN){/* 检测到按键被按下 */USER_KEY.press_timerms = PRESS_NONE;printf_log("USER_KEY is pressed ...
以下NVIC 接口位于GD32F10x_Firmware_Library_V2.2.2\Firmware\GD32F10x_standard_peripheral\Include\gd32f10x_misc.h。 2.1 nvic_priority_group_set nvic_prigroup: 优先级组,详细列表如下: 2.2 nvic_irq_enable 以下GPIO 接口位于GD32F10x_Firmware_Library_V2.2.2\Firmware\GD32F10x_standard_peripheral\Inc...
nvic_irq_enable(UART3_IRQn, 1, 1); rcu_periph_clock_enable(RCU_GPIOC); rcu_periph_clock_enable(RCU_UART3); /* connect port to USARTx_Tx */ gpio_init(GPIOC, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_10); /* connect port to USARTx_Rx */ ...