• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






足迹~

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2012年8月7日

android mmm和mm 的编译(转)
摘要: http://hi.baidu.com/%C0%F6%C1%B5%D0%DC/blog/item/055670230d694f33d52af16c.html三个m的含义以下是在help中看到的信息- m: Makes from the top of the tree.- mm: Builds all of the modules in the current directory.- mmm: Builds all of the modules in the supplied directories.m,显然是makemm ,在编译单一模块的时候可以在当前目录下使用mmm 可以在android目 阅读全文
posted @ 2012-08-07 09:33 足迹~ 阅读(501) 评论(0) 推荐(0)
 

2012年7月31日

memmove代码
摘要: memmove和memcpy。src和dst指向的区域重叠,memmove仍可以正确处理void *memmove(void *dst, const void *src, size_t count){ char *tmp, *s; if (dst <= stc) { tmp = (char *)dst; s = (char *)src; while (count --) { *tmp++ = *s++; } } else { tmp = (char *)dst + count; s = (char *)src + count; while (count--) { *--tmp = *-- 阅读全文
posted @ 2012-07-31 11:01 足迹~ 阅读(136) 评论(0) 推荐(0)
 
不用中间变量,实现a,b值交换算法
摘要: (1)使用异或 a^=b; b^=a; a^=b;局限性,只能用于整型数(2)使用加减法 a = a + b; b = a - b; a = a - b;局限性,a,b数据太大时可能会溢出 阅读全文
posted @ 2012-07-31 11:00 足迹~ 阅读(199) 评论(0) 推荐(0)
 

2012年7月18日

Nand Flash
摘要: #define NFDATA_READ *(volatile unsigned char*)0x70200010字节读写#define NFDATA_READ *(volatile unsigned int*)0x70200010字读写读ID代码:int nand_read_id(void){ int id; NAND_CHIP_ENABLE(); set_val(NFCMMD, 0x90); set_val(NFADDR, 0x00); NAND_READY(); printf("id0 = %02x", NFDATA_READ); print... 阅读全文
posted @ 2012-07-18 09:31 足迹~ 阅读(180) 评论(0) 推荐(0)
 

2012年7月11日

Kconfig的用途
摘要: (1)是否编译文件。可通过Konfig中定义XXX,然后在Makefile中用obj-$(CONFIG_XXX) 控制。(2)是否编译文件中的代码。可通过Konfig中定义XXX,然后在代码中用#ifdef CONFIG_XXX#endif控制.(3)宏定义可变的值.可通过Konfig中定义XXX,然后在代码中用#define TEST CONFIG_XXX 实现。最后,修改arch/arm/Kconfig,使新增的Kconfig起作用。 阅读全文
posted @ 2012-07-11 12:25 足迹~ 阅读(342) 评论(0) 推荐(0)
 

2012年7月10日

(转)mini6410板uboot的lowlevel_init.S
摘要: mini6410板uboot的lowlevel_init.S转自见龙在天http://maxshu.diandian.com/post/2011-04-26/588022文件:u-boot/board/samsung/mini6410/lowlevel_init.S#include <config.h>#include <version.h>#include <s3c6410.h>#include "mini6410_val.h"_TEXT_BASE: .word TEXT_BASE @每个lds里面的模块,都可以定义一个TEXT_BAS 阅读全文
posted @ 2012-07-10 23:26 足迹~ 阅读(374) 评论(0) 推荐(0)
 

2012年7月5日

GPIO控制(点亮LED)
摘要: LED灯GPIO连接示意图: --------- |GPM0 |--LED1 --------- |GPM1 |--LED2 --------- |GPM2 |--LED3 --------- |GPM3 |--LED4 --------- active low相关寄存器: Register Address R/W Description Reset Value GPMCON 0x7F008820 R/W Port M Configuration Register 0x00222222 GPMDAT 0x7F008824 R/W Port M Data Register Undefined G 阅读全文
posted @ 2012-07-05 21:45 足迹~ 阅读(529) 评论(0) 推荐(0)
 
函数调用时SP的使用方法
摘要: 需要用到的通用寄存器:FP 和 fp(帧指针,用来寻堆栈值);如:str r0, [fp, #-16] ldr r0, [fp, #-16]IP 和 ip(过程调用中间临时寄存器,同 R12);SP 和 sp(堆栈指针,同 R13);LR 和 lr(链接寄存器,同 R14);PC 和 pc(程序计数器,同 R15).出栈入栈过程: mov ip, sp //中间临时寄存器ip,保存sp stmfd sp!, {fp, ip, lr, pc} //满堆栈递减,‘!’使sp = sp - 4*4 sub fp, ip, #4 //帧指针位置/* sub sp, #8 @开辟空间; ... int 阅读全文
posted @ 2012-07-05 16:44 足迹~ 阅读(756) 评论(0) 推荐(0)
 

2012年7月3日

二级指针动态数组,模拟指针数组
摘要: 创建二级指针动态数组,模拟指针数组。里面存放键盘输入的字符串,回车键确定输入,-1为退出条件。#include <stdio.h>#include <stdlib.h>#include <string.h>int main(void){ char **p = NULL; char **prev = NULL; int count = 0; char buf[1024] = {0}; int i; int val; while (1) { printf("input string\n"); scanf("%s", buf 阅读全文
posted @ 2012-07-03 15:20 足迹~ 阅读(247) 评论(0) 推荐(0)
 

2012年7月2日

int型动态数组
摘要: 创建动态数组,里面存放键盘输入的数字,回车键确定输入,-1为退出条件。#include <stdio.h>#include <string.h>#include <stdlib.h>int main(void){ int count = 0; int *p = NULL; int *prev = NULL; int new; int i; while (1) { printf("input number \n"); scanf("%d", &new); if (-1 == new) break;... 阅读全文
posted @ 2012-07-02 23:34 足迹~ 阅读(284) 评论(0) 推荐(0)