我正在研究 STM32F103,目的是实现一些库。
当我声明 NVIC_InitStructure 时,它带有红色下划线,这意味着 Eclipse 无法识别它。我在使用它之前确实声明过:NVIC_InitTypeDef NVIC_InitStructure;
但它是红色未划线的。
也许在使用之前要包含一个库?
NVIC_InitTypeDef NVIC_InitStructure;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_InitStructure.NVIC_IRQChannel = CAN1_RX0_INTERRUPTS;
NVIC_Init(&NVIC_InitStructure);
NVIC_InitStructure.NVIC_IRQChannel = CAN1_TX_INTERRUPTS;
NVIC_Init(&NVIC_InitStructure);