摘要:
Think in Java 一本让人沮丧的书。 --mark一、分析和设计 不同于C primer plus,她教你的不单是扎实的基础,还是一种思考问题的方法,你会不会忽然有一天发现自己不会编程!1、 阶段 0 :拟出一个计划 假如能在整个过程中设置几个标志,或者“路标”,将更有益于你集中注意力。这恐怕比单纯地为了“完成工作”而工作好得多。至少,在达到了一个又一个的目标,经过了一个接一个的路标以后,可对自己的进度有清晰的把握,干劲也会相应地提高,不会产生“路遥漫漫无期”的感觉。=================仅对我有效================= (1)通过proc实现gsl芯片读.. 阅读全文
摘要:
说到sensor就不得不说下电源管理,power是如此神奇,没了他所有电子产品就是一堆垃圾。1) power(此部分参考了http://www.byywee.com/page/M0/S633/633654.html)// Framework layer// frameworks/base/core/java/android/os/PowerManager.java /** * Makes sure the device is on at the level you asked when you created * the wake lock.
... 阅读全文
摘要:
存在问题,在通信的时候可能会死机,不知道是#define NETLINK_TEST 30未在include/linux/netlink.h定义导致,还是其他问题(加锁)。netlink.c#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <net/sock.h>
#include <net/netlink.h> #define pr_inf(fmt, a 阅读全文
摘要:
net 关于Linux 网络协议栈,这边有个牛人的博客,可以进去看看(用户空间和内核空间当然也可以通过netlink通信)。这里也有个博客讲网络协议栈http://blog.csdn.net/yming0221/article/details/7971463 阅读全文
摘要:
Syscall|---------------------------------------------------| |---------------------------------------------------|
| |----------------------| |----------------------| | | |----------------------| |----------------------| |
| | | | | | | | ... 阅读全文
摘要:
Processes1 进程描述符about 1.7k size, save in a list named task list.include/linux/sched.hstruct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ void *stack; atomic_t usage; unsigned int flags; /* per process flags, defined below */ unsigned int ptrace; int lock_dept... 阅读全文
摘要:
你不可能空手建起一座城堡。 --mark1、注释自动生成文档./scripts/kernel-doc -v -html *.c > outfile.html2、linux coding-style./scripts/Lindent -kr -i8 -ts8 -sob -l80 -ss -bs -psl <file>3、创建补丁和打补丁diff -urN ../pre-branch/ . > my-patchpatch -p1 < ../next-brach/my-patch4、Latex 用于比较正规的文档(框架参考Ones里面)5、git必须提下!单机开发模式: 阅读全文
摘要:
:copen :make(需要自建makefile)双击错误跳转到错误出现地方[转] 最佳vim技巧最佳vim技巧----------------------------------------# 信息来源----------------------------------------www.vim.org : 官方站点comp.editors : 新闻组http://www.newriders.com/books/opl/ebooks/0735710015.html : Vim书籍http://vimdoc.sourceforge.net/cgi-bin/vim2html2.pl : 关于v 阅读全文
摘要:
#!/bin/bash # 需要直到执行成功的命令
command="repo sync" $command # 返回值赋给 $result
result=$?
echo "result = "$result until [ $result -eq 0 ]
do
echo "retry"
$command
result=$?
done 阅读全文
摘要:
1. 实现kernel层驱动 1)修改arch/arm/Kconfig和driver/Kconfig,在menu "Device Drivers"和endmenu之间添加一行: source "drivers/hello/Kconfig" 2)添加hello.c hello.h Makefile Kconfig Readme 5 个文件Makefile:#
# Makefile for the input core drivers.
# # Each configuration option enables a list of files. obj-$( 阅读全文