摘要: linux-2.6.32.内核重要文件目录:linux-2.6.32.2/arch/arm/mach-s3c2410/include/mach/regs-gpio.hlinux-2.6.32.2/arch/arm/plat-s3c24xx/gpio.clinux-2.6.32.2/linux/asm-generic/io.hlinux-2.6.32.2/include/linux/wait.hasm -- linux-2.6.32.2/linux/asm-genericmach -- linux-2.6.32.2/arch/arm/mach-s3c2410/include/machplat . 阅读全文
posted @ 2012-12-03 16:55 黑-色-柳—丁 阅读(574) 评论(0) 推荐(0) 编辑
摘要: 打开int open(struct inode *inode,struct file *filp);模块使用计数加1识别次设备号硬件操作检查设备相关错误(诸如设备未就绪或类似的硬件问题)如果设备是首次打开,则对其初始化如果有中断操作,申请中断处理程序关闭int release(struct inode *inode,struct file *filp);模块使用计数减1释放由open分配的,保存在filp>private_data里的所有内容。硬件操作:如果申请了中断,则释放中断中中断处理程序。在最后一次关闭操作时关闭设备。read/writessize_t read(struct fi 阅读全文
posted @ 2012-12-02 21:18 黑-色-柳—丁 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 一:字符设备开发的基本步骤 1.确定主设备号和次设备号主设备和号是内核识别一类设备的标识。整数(占12位)一般1-255次设备号由内核使用,用于正确确定设备文件所指的设备。整数(20位)一般0-255设备编号的内部表示dev_t类型(32位)用来保存设备编号(包括主设备号(12位)和次设备号(20位))从dev_t获得主设备号和次设备号:MAJOR(dev_t);MINOR(dev_t);将主设备号和次设备号转换成dev_t类型:MKDEV(int major,int minor); 分配主设备号手工分配主设备号:找一个内核没有使用的主设备号来使用#include<linux/fs.h& 阅读全文
posted @ 2012-12-02 16:59 黑-色-柳—丁 阅读(207) 评论(0) 推荐(0) 编辑
摘要: helloworl.c#include<linux/init.h>#include<linux/module.h>MODULE_LICENSE("Dual BSD/GPL");static int hello_init(void){ printk("hello world"); return 0;}static void hello_exit(void){ printk("exit the hello world!\n");}module_init(hello_init);module_exit(hello_e 阅读全文
posted @ 2012-12-02 16:09 黑-色-柳—丁 阅读(356) 评论(0) 推荐(0) 编辑
摘要: FSF(free software foundation):http://www.fsf.org/resources //自由软件联盟boa: www.boa.orgsqlite www.sqlite.org中国unix:www.chain.net;gnu:www.gnu.org国内镜像:gnu.linuxforum.netlinux内核 : ftp.kerner.orggcc: gcc.gnu.orgfedora :www.fedora.redhat.com :archives.fedoraproject.org/pub交叉编译:linux.omap.com/pub/toolcha... 阅读全文
posted @ 2012-10-29 09:57 黑-色-柳—丁 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Edittxt.getText().trim(); //trim取出字符串两端的空字符,修剪字符串 阅读全文
posted @ 2012-09-13 17:02 黑-色-柳—丁 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 退出程序android.os.Process.killProcess(android.os.Process.myPid());seekbar空间: <SeekBar android:id="@+id/myseekbar" android:layout_width="fill_parent" android:layout_height="17dp" android:layout_below="@id/music_playering_names" android:layout_margi... 阅读全文
posted @ 2012-09-12 19:56 黑-色-柳—丁 阅读(668) 评论(0) 推荐(0) 编辑
摘要: 触发器: Intent intent = new Intent(); intent.putExtra("names_music", list_names.get(positions)); intent.setAction("android.intent.action.names"); MyService.this.sendBroadcast(intent);接收器:(单独的类中)class myReceiver extends BroadcastReceiver(){ @Override public void onReceive(Context con 阅读全文
posted @ 2012-09-11 10:39 黑-色-柳—丁 阅读(402) 评论(0) 推荐(0) 编辑
摘要: 首先要继承OnItemLongClickListenerpublic class Set_Music extends ListActivity implements OnItemLongClickListener{然后设置权限:getListView().setOnItemLongClickListener(this);重写方法public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { String str = list.get(arg2).get("name& 阅读全文
posted @ 2012-09-07 20:08 黑-色-柳—丁 阅读(15159) 评论(1) 推荐(0) 编辑
摘要: adb remount安装程序:adb intall D:\xxxx 阅读全文
posted @ 2012-09-06 19:35 黑-色-柳—丁 阅读(773) 评论(0) 推荐(0) 编辑