华中科技大学嵌入式实验源码+报告

上传者: 39188039 | 上传时间: 2019-12-21 20:50:37 | 文件大小: 1.59MB | 文件类型: zip
包含代码和文档 实验一 实验内容 编写程序,演示多进程并发执行和进程软中断、管道通信。 父进程使用系统调用pipe( )建立一个管道,然后使用系统调用fork()创建两个子进程,子进程1和子进程2; 子进程1每隔1秒通过管道向子进程2发送数据: I send you x times. (x初值为1,每次发送后做加一操作) 子进程2从管道读出信息,并显示在屏幕上。 父进程用系统调用signal()捕捉来自键盘的中断信号(即按Ctrl+C键);当捕捉到中断信号后,父进程用系统调用Kill()向两个子进程发出信号,子进程捕捉到信号后分别输出下列信息后终止: Child Process l is Killed by Parent! Child Process 2 is Killed by Parent! 父进程等待两个子进程终止后,释放管道并输出如下的信息后终止 Parent Process is Killed! 实验二 实验内容 过Linux多线程与信号灯机制,设计并实现计算机线程与I/O线程共享缓冲区的同步与通信。 程序要求:两个线程,共享公共变量a 线程1负责计算(1到100的累加,每次加一个数) 线程2负责打印(输出累加的中间结果) 实验三 实验内容 利用多个共享内存(有限空间)构成的环形缓冲,将源文件复制到目标文件,实现两个进程的誊抄。 实验四 实验内容 1、(1)Blink程序的编译和下载 (2)给Blink程序加入printf,在每次定时器事件触发点亮LED的同时通过串口显示信息 (3)修改BLink程序,只使用一个Timer,三个LED灯作为3位的二进制数表示(亮灯为1,不亮为0),按照0-7的顺序循环显示,同时将数值显示在终端上。

文件下载

资源详情

[{"title":"( 87 个子文件 1.59MB ) 华中科技大学嵌入式实验源码+报告","children":[{"title":"X201605005+覃家旺","children":[{"title":"lib3","children":[{"title":"main.c <span style='color:#111;'> 1.96KB </span>","children":null,"spread":false},{"title":"copy.c <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":"get.c <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false},{"title":"put.c <span style='color:#111;'> 1.44KB </span>","children":null,"spread":false}],"spread":true},{"title":"lib4","children":[{"title":"3.2","children":[{"title":"BlinkAppC.nc <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"README.txt <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"BlinkC.nc <span style='color:#111;'> 2.95KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 364.12KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 17.36KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 20.20KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 17.72KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"1","children":[{"title":"BlinkAppC.nc <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"README.txt <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"BlinkC.nc <span style='color:#111;'> 3.22KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 364.14KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 24.45KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 30.19KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 24.81KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"5","children":[{"title":"README.txt <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"TestSensorC.nc <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"TestSensorAppC.nc <span style='color:#111;'> 458B </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 113B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 693.86KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 50.23KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 60.33KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 50.59KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 185B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"dir","children":[{"title":"path <span style='color:#111;'> 24B </span>","children":null,"spread":false},{"title":"a.out <span style='color:#111;'> 8.95KB </span>","children":null,"spread":false},{"title":"ls.c <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false}],"spread":true},{"title":"2","children":[{"title":"BlinkAppC.nc <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"README.txt <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"BlinkC.nc <span style='color:#111;'> 3.02KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 363.71KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 24.20KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 30.07KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 24.55KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"2.2","children":[{"title":"BlinkAppC.nc <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"README.txt <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"BlinkC.nc <span style='color:#111;'> 3.02KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 363.70KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 24.20KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 30.07KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 24.55KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true},{"title":"3","children":[{"title":"BlinkAppC.nc <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"README.txt <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"BlinkC.nc <span style='color:#111;'> 2.95KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 364.12KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 17.38KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 20.21KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 17.74KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"4","children":[{"title":"BlinkAppC.nc <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"README.txt <span style='color:#111;'> 678B </span>","children":null,"spread":false},{"title":"BlinkC.nc <span style='color:#111;'> 3.10KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 108B </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 364.88KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 17.58KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 20.28KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 17.93KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"PC","children":[{"title":"README.txt <span style='color:#111;'> 884B </span>","children":null,"spread":false},{"title":"TestPrintfAppC.nc <span style='color:#111;'> 2.60KB </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 114B </span>","children":null,"spread":false},{"title":"TestPrintfC.nc <span style='color:#111;'> 2.68KB </span>","children":null,"spread":false},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 356.68KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 24.19KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 30.59KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 24.55KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 185B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"build","children":[{"title":"telosb","children":[{"title":"app.c <span style='color:#111;'> 164.65KB </span>","children":null,"spread":false},{"title":"main.ihex <span style='color:#111;'> 7.19KB </span>","children":null,"spread":false},{"title":"main.exe <span style='color:#111;'> 11.60KB </span>","children":null,"spread":false},{"title":"tos_image.xml <span style='color:#111;'> 7.54KB </span>","children":null,"spread":false},{"title":"ident_flags.txt <span style='color:#111;'> 180B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"lib1","children":[{"title":"lib1.c <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false}],"spread":true},{"title":"实验报告.docx <span style='color:#111;'> 877.10KB </span>","children":null,"spread":false},{"title":"lib2","children":[{"title":"lib2.c <span style='color:#111;'> 2.38KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • 0x001 :
    非常好,适合参考学习
    2019-11-28

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明