Chinaunix首页 | 论坛 | 博客
  • 博客访问: 443049
  • 博文数量: 113
  • 博客积分: 446
  • 博客等级: 下士
  • 技术积分: 1229
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-09 16:01
个人简介

Let's go!!!!!

文章分类

全部博文(113)

文章存档

2019年(5)

2018年(4)

2017年(9)

2016年(5)

2015年(39)

2014年(6)

2013年(28)

2012年(17)

发布时间:2013-09-30 12:42:19

//驱动程序#include <linux/module.h>#include <linux/init.h>#include <linux/irq.h>#include <linux/platform_device.h>#include <mach/regs-gpio.h>#include <mach/hardware.h>#include <mach/gpio.h>#include <asm/irq.h>#include <linux/device.h>#include <linux/poll.h>#include <linux/interrupt.h>#in.........【阅读全文】

阅读(1339) | 评论(0) | 转发(0)

发布时间:2013-09-12 09:06:49

assert宏的原型定义在<assert.h>中,其作用是如果它的条件返回错误,则终止程序执行,原型定义:#include <assert.h>void assert( int expression );  assert的作用是现计算表达式 expression ,如果其值为假(即为0),那么它先向stderr打印一条出错信息,然后通过调用 abort 来终止程序运行。请看下面的程序清单ba.........【阅读全文】

阅读(860) | 评论(0) | 转发(0)

发布时间:2013-09-11 21:03:57

#include <stdio.h>unsigned char  aa[3][4]={{0,1,2,3},{3,4,5,6},{6,7,8,9}};void test(unsigned char (*bb)[4]){  int i=0,j=0;  for(i=0;i<3;i++)  {      for(j=0;j<4;j++)      {       printf("%d ",*(*(bb+i)+j));//   &n.........【阅读全文】

阅读(892) | 评论(0) | 转发(0)

发布时间:2013-09-11 20:56:38

怎么会有可重入和不可重入的概念呢?在多任务系统下,中断可能在任务执行的任何时间发生;如果一个函数的执行期间被中断后,到重新恢复到断点进行执行的过程中,函数所依赖的环境没有发生改变,那么这个函数就是可重入的,否则就不可重入。在中断前后不都要保存和恢复上下文吗,怎么会出现函数所依赖的环境发生改.........【阅读全文】

阅读(1116) | 评论(0) | 转发(0)

发布时间:2013-09-09 11:02:45

#include <stdio.h> #include <stdlib.h>#include <math.h>#define max(a,b) (((a) > (b)) ? (a) : (b))#define eps 1e-6 float mysqrt(float n) {   if(n<0)  return n;   float ans;    float low,up;    low=0,up=max(n,1);    ans=(low+up)/2;  &nbs.........【阅读全文】

阅读(978) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册