OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 3769|回复: 2

各位大神门实在是不知道问题出在那?? 求帮助

[复制链接]

12

主题

26

帖子

0

精华

初级会员

Rank: 2

积分
163
金钱
163
注册时间
2015-9-2
在线时间
34 小时
发表于 2015-9-3 22:07:38 | 显示全部楼层 |阅读模式
5金钱
#include "exit.h"
#include "led.h"
#include "key.h"
#include "delay.h"
#include "usart.h"

void EXTIX_Init(void)
{
//?¨?????????????????á????
  EXTI_InitTypeDef EXTI_InitStructure;
  NVIC_InitTypeDef NVIC_InitStructure;

RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO,ENABLE);

Key_Init();  


GPIO_EXTILineConfig(GPIO_PortSourceGPIOA,GPIO_PinSource15);  

EXTI_InitStructure.EXTI_Line=EXTI_Line15;  
EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;/
EXTI_InitStructure.EXTI_Mode = EXTI_Trigger_Falling; //
EXTI_InitStructure.EXTI_LineCmd = ENABLE;
EXTI_Init(&EXTI_InitStructure);



NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn; 
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority =0x02;
NVIC_InitStructure.NVIC_IRQChannelSubPriority =0x00;     
NVIC_InitStructure.NVIC_IRQChannelCmd =ENABLE;   
NVIC_Init(&NVIC_InitStructure);         

}




void EXTI15_10_IRQHandler(void)
{
delay_ms(10);
if(key1==0)
{
while(!key1);
LED1=!LED1;
}
EXTI_ClearITPendingBit(EXTI_Line15); 
}




..\hardwork\exit\exit.c(11): error:  #20: identifier "EXTI_InitTypeDef" is undefined
        EXTI_InitTypeDef EXTI_InitStructure;
..\hardwork\exit\exit.c(21): error:  #20: identifier "EXTI_Line15" is undefined
        EXTI_InitStructure.EXTI_Line=EXTI_Line15;  //给该io口规定中断线
..\hardwork\exit\exit.c(22): error:  #20: identifier "EXTI_Mode_Interrupt" is undefined
        EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;//??
..\hardwork\exit\exit.c(23): error:  #20: identifier "EXTI_Trigger_Falling" is undefined
        EXTI_InitStructure.EXTI_Mode = EXTI_Trigger_Falling; //设置触发模式为下降沿触发
..\hardwork\exit\exit.c(25): warning:  #223-D: function "EXTI_Init" declared implicitly
        EXTI_Init(&EXTI_InitStructure);//根据EXTI_InitStruct中指定的参数初始化外设EXTI寄存? ???         ^
..\hardwork\exit\exit.c(48): warning:  #223-D: function "EXTI_ClearITPendingBit" declared implicitly
        EXTI_ClearITPendingBit(EXTI_Line15); //释放line15线路挂起位
..\hardwork\exit\exit.c(48): error:  #20: identifier "EXTI_Line15" is undefined
        EXTI_ClearITPendingBit(EXTI_Line15); //释放line15线路挂起位
..\hardwork\exit\exit.c: 2 warnings, 5 errors



最佳答案

查看完整内容[请看2#楼]

头文件没加进来。 具体去看:stm32f10x_conf.h里面,是否屏蔽了:stm32f10x_nvic.h
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

530

主题

11万

帖子

34

精华

管理员

Rank: 12Rank: 12Rank: 12

积分
165540
金钱
165540
注册时间
2010-12-1
在线时间
2117 小时
发表于 2015-9-3 22:07:39 | 显示全部楼层
头文件没加进来。
具体去看:stm32f10x_conf.h里面,是否屏蔽了:stm32f10x_nvic.h
我是开源电子网www.openedv.com站长,有关站务问题请与我联系。
正点原子STM32开发板购买店铺http://openedv.taobao.com
正点原子官方微信公众平台,点击这里关注“正点原子”
回复

使用道具 举报

12

主题

26

帖子

0

精华

初级会员

Rank: 2

积分
163
金钱
163
注册时间
2015-9-2
在线时间
34 小时
 楼主| 发表于 2015-9-4 10:51:50 | 显示全部楼层
谢谢了  我的是屏蔽了stm32f10x_exti.h文件  非常感谢您的回答
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-17 02:18

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表