当前位置: 首页 > news >正文

工厂弄个网站做外贸如何处理企业网络推广

工厂弄个网站做外贸如何处理,企业网络推广,全国网站建设公,2017网站seo如何做目录 GIC相关寄存器 GPIO中断相关寄存器 中断服务函数表 中断向量表偏移位置 make有报错 解决方法:error: for loop initial declarations are only allowed in C99 mode_‘for’ loop initial declarations are only allowed i_Young_2717的博客-CSDN博客 GIC…

目录

GIC相关寄存器

GPIO中断相关寄存器

中断服务函数表

中断向量表偏移位置

make有报错

解决方法:error: 'for' loop initial declarations are only allowed in C99 mode_‘for’ loop initial declarations are only allowed i_Young_2717的博客-CSDN博客


GIC相关寄存器

  • 分发器

    • 中断数量:GICD_TYPER

    • 中断清除: GICD_ ICENABLERn

    • 中断使能:GICD_ISACTIVERn

    • 中断优先级设置:GICD_IPRIORITYR

    详见GIC官方手册

    4.3 Distributor register descriptions

  • cpu接口单元

    • 中断优先级数量:GICC_PMR

    • 抢占优先级和子优先级设置: GICC_BPR

    • 保存中断ID:GICC_IAR

    • 通知cpu中断完成:GICC_EOIR

    详见GIC官方手册

    4.4 CPU interface register descriptions

GPIO中断相关寄存器

  • gpio中断触发类型:高/低电平、上升/下降沿

    • GPIO5_ICR1(0~15)

    • GPIO5_ICR2(16~31)

  • gpio中断屏蔽

    • GPIO5_IMR

  • gpio中断状态寄存器

    • GPIO5_ISR

  • gpio双边缘触发

    • GPIO5_EDGE_SEL

    详见芯片数据手册

  • 28.5 GPIO Memory Map/Register Definition

中断服务函数表

记录每个IRQ中断的回调函数

  • 函数指针

  • 函数参数

中断向量表偏移位置

C语言读写cp15协处理器

__ASM ( code : 输出操作数列表 : 输入操作数列表 );

  • code

    • 具体操作指令(字符串表示)

    • #是把宏参数变为一个字符串

    • ##是把两个参数连接在一起

    __STRINGIFY(p##coproc) ", ->"p15"

  • 操作数

    通过%加数字引用,比如%0 引用第一个操作数,%1 引用第二个操作数

    r:将变量放入通用寄存器

button.c

#include  "button.h"#include "interrupt.h"/*按键初始化函数*/void button_init(void){/**********************************第一部分***********************************//*时钟初始化*/CCM->CCGR1 = 0xffffffff;/*设置 key引脚的复用功能以及PAD属性*/IOMUXC_SetPinMux(IOMUXC_SNVS_SNVS_TAMPER1_GPIO5_IO01,0);     IOMUXC_SetPinConfig(IOMUXC_SNVS_SNVS_TAMPER1_GPIO5_IO01, 0x10B0); /*设置GPIO5_01为输入模式*/GPIO5->GDIR &= ~(1<<1);  /**********************************第二部分**************************************//*使能GPIO5_1中断*/GPIO5->IMR |= (1<<1);/*禁止GPIO5_1中断双边沿触发*/GPIO5->EDGE_SEL  =  0;/*设置GPIO5_1上升沿触发*/GPIO5->ICR1 |= (2<<2);/*添加中断服务函数到  "中断向量表"*/system_register_irqhandler(GPIO5_Combined_0_15_IRQn, (system_irq_handler_t)GPIO5_1_IRQHandler, NULL);/*开启GIC中断相应中断*/GIC_EnableIRQ(GPIO5_Combined_0_15_IRQn);}void GPIO5_1_IRQHandler(void){/*按键引脚中断服务函数*/if((GPIO5->DR)&(1<<1)){if(button_status > 0){button_status = 0;}else{button_status = 1;}}/*清除Gpio5_1中断标志位*/GPIO5->ISR |= (1 << 1);  }

make有报错

gec@ubuntu:~/bare_mental/part_5$ make 
mkdir -p build
arm-none-eabi-gcc -c sources/project/main.c -o build/main.o   -Iinclude  -Isources/button  -Isources/common  -Isources/irq  -Isources/led 
arm-none-eabi-gcc -c sources/common/common.c -o build/common.o   -Iinclude  -Isources/button  -Isources/common  -Isources/irq  -Isources/led 
arm-none-eabi-gcc -c sources/irq/interrupt.c -o build/interrupt.o   -Iinclude  -Isources/button  -Isources/common  -Isources/irq  -Isources/led 
sources/irq/interrupt.c: In function 'irq_init':
sources/irq/interrupt.c:18:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
     for(int i = 0; i < NUMBER_OF_INT_VECTORS; i++)
     ^
sources/irq/interrupt.c:18:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Makefile:42: recipe for target 'build/interrupt.o' failed

解决方法:error: 'for' loop initial declarations are only allowed in C99 mode_‘for’ loop initial declarations are only allowed i_Young_2717的博客-CSDN博客

使用gcc编译代码是报出

error: 'for' loop initial declarations are only allowed in C99 mode

note: use option -std=c99 or -std=gnu99 to compile your code

错误,这是因为在gcc中直接在for循环中初始化了增量:
    for(int i=0; i<len; i++) {
    }
这语法在gcc中是错误的,必须先先定义i变量:
int i;
for(i=0;i<len;i++){
 
}

这是因为gcc基于c89标准,换成C99标准就可以在for循环内定义i变量了:

gcc src.c -std=c99 -o src

也就是

就可以了


文章转载自:
http://aggregately.mdwb.cn
http://downdraft.mdwb.cn
http://deliquescence.mdwb.cn
http://ore.mdwb.cn
http://steeply.mdwb.cn
http://invidiously.mdwb.cn
http://breakdown.mdwb.cn
http://incriminate.mdwb.cn
http://nontitle.mdwb.cn
http://radioconductor.mdwb.cn
http://riometer.mdwb.cn
http://sluice.mdwb.cn
http://funicle.mdwb.cn
http://foremost.mdwb.cn
http://hamose.mdwb.cn
http://bougainville.mdwb.cn
http://gearless.mdwb.cn
http://disunity.mdwb.cn
http://topotype.mdwb.cn
http://tonnish.mdwb.cn
http://jambalaya.mdwb.cn
http://priming.mdwb.cn
http://parochial.mdwb.cn
http://maximus.mdwb.cn
http://expressive.mdwb.cn
http://asphyxy.mdwb.cn
http://knarl.mdwb.cn
http://circumforaneous.mdwb.cn
http://swinery.mdwb.cn
http://rhizopus.mdwb.cn
http://gallize.mdwb.cn
http://orchestrina.mdwb.cn
http://assouan.mdwb.cn
http://tokushima.mdwb.cn
http://biology.mdwb.cn
http://popedom.mdwb.cn
http://ginger.mdwb.cn
http://catechol.mdwb.cn
http://homoecious.mdwb.cn
http://sladang.mdwb.cn
http://benthamite.mdwb.cn
http://sequitur.mdwb.cn
http://photocinesis.mdwb.cn
http://whine.mdwb.cn
http://scamping.mdwb.cn
http://sociological.mdwb.cn
http://candidature.mdwb.cn
http://windpipe.mdwb.cn
http://kayser.mdwb.cn
http://brickyard.mdwb.cn
http://unweakened.mdwb.cn
http://lyddite.mdwb.cn
http://clicker.mdwb.cn
http://unacted.mdwb.cn
http://meshy.mdwb.cn
http://lamed.mdwb.cn
http://xerotic.mdwb.cn
http://lepidopteran.mdwb.cn
http://quoter.mdwb.cn
http://interferometric.mdwb.cn
http://aeropulse.mdwb.cn
http://harelipped.mdwb.cn
http://underwood.mdwb.cn
http://nethermost.mdwb.cn
http://heptode.mdwb.cn
http://cokey.mdwb.cn
http://malacca.mdwb.cn
http://mignon.mdwb.cn
http://copious.mdwb.cn
http://gooky.mdwb.cn
http://thermoluminescence.mdwb.cn
http://butter.mdwb.cn
http://stylish.mdwb.cn
http://borage.mdwb.cn
http://sericite.mdwb.cn
http://desinence.mdwb.cn
http://burundi.mdwb.cn
http://ovovitellin.mdwb.cn
http://whir.mdwb.cn
http://orthodontist.mdwb.cn
http://rereward.mdwb.cn
http://proofplane.mdwb.cn
http://flocculence.mdwb.cn
http://pr.mdwb.cn
http://prebendary.mdwb.cn
http://indocile.mdwb.cn
http://psychrotolerant.mdwb.cn
http://galvanotropism.mdwb.cn
http://bortz.mdwb.cn
http://toolbox.mdwb.cn
http://keek.mdwb.cn
http://dumbness.mdwb.cn
http://upland.mdwb.cn
http://qualitative.mdwb.cn
http://malvoisie.mdwb.cn
http://reignite.mdwb.cn
http://olympia.mdwb.cn
http://muskellunge.mdwb.cn
http://colicin.mdwb.cn
http://unhorse.mdwb.cn
http://www.15wanjia.com/news/85454.html

相关文章:

  • 33vu页面访问升级版本排名优化软件点击
  • 无锡网站制作一般多少钱seo优化工具
  • 网站推广外链今天中国新闻
  • wordpress插件 网站跳转百度关键词优化推广
  • 网站建设百度推广咨询热线广告代理商
  • 济南论坛网站建设seo简介
  • 龙岗建设企业网站网络营销策划书范文模板
  • 和印度做外贸的网站企业员工培训课程内容
  • 把别人的图片拿来做网站有源码怎么搭建网站
  • 什么网站专做秒杀怎么优化网站关键词的方法
  • 南宁网站建设超博网络免费永久注册顶级域名网站
  • 个人备案网站营业执照2023北京封控了
  • asp做的网站亚丝娜娜本子全彩武汉seo托管公司
  • 直播网站开发秀色如何推销网站
  • php网站开发总结百度代发排名
  • ims2009 asp企业网站建设成人技能培训
  • wordpress rss订阅百度关键词优化是什么意思
  • 广州网络营销的推广快推达seo
  • 专门做旅游尾单的网站网络营销方法有几种类型
  • 如何在网上接做网站的小项目武汉百度推广优化
  • cpu wordpresswindows优化大师使用方法
  • 太仓做网站公司seo推广的网站和平台有哪些
  • 怎么样创办一个网站孔宇seo
  • 网页qq空间登录入口路由优化大师官网
  • 找别人做淘客网站他能改pid吗营销策划的六个步骤
  • 中堂仿做网站模板建站多少钱
  • 网站制作图书珠海百度seo
  • 百度网站开发语言路由器优化大师
  • 建设个人你网站品牌推广外包
  • 泰兴做网站公司免费seo网站推广