关于stm32通信中断设置:HAL_NVIC_SetPendingIRQ报错
staticvoidMX_USART2_UART_Init(void){huart2.Instance=USART1;huart2.Init.BaudRate=9600;...
static void MX_USART2_UART_Init(void){ huart2.Instance = USART1; huart2.Init.BaudRate = 9600; huart2.Init.WordLength = UART_WORDLENGTH_8B; huart2.Init.StopBits = UART_STOPBITS_1; huart2.Init.Parity = UART_PARITY_NONE; huart2.Init.Mode = UART_MODE_TX_RX; huart2.Init.HwFlowCtl = UART_HWCONTROL_NONE; huart2.Init.OverSampling = UART_OVERSAMPLING_16; HAL_NVIC_EnableIRQ (USART2_IRQn); HAL_NVIC_SetPendingIRQ (USART2_IRQn,0,0); HAL_UART_Init(&huart2); if (HAL_UART_Init(&huart2) != HAL_OK) { _Error_Handler(__FILE__, __LINE__); }}../Src/main.c(100): error: #140: too many arguments in function call什么参数是多的?另一台电脑没有错误,但在这里就报错,为什么?
展开
1个回答
2018-02-01
展开全部
回调函数参数多了,你看到红色波浪线了么,放上去看看是什么
/**
* @brief Sets Pending bit of an external interrupt.
* @param IRQn External interrupt number
* This parameter can be an enumerator of IRQn_Type enumeration
* (For the complete STM32 Devices IRQ Channels list, please refer to the appropriate CMSIS device file (stm32f10xxx.h))
* @retval None
*/
void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn)
{
/* Set interrupt pending */
NVIC_SetPendingIRQ(IRQn);
} 620812
这个函数原型,你多放了
追问
谢谢解答
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询