<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[lhembed的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/lhembed</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; lhembed]]></copyright><item><title><![CDATA[阻塞与非阻塞I/O ]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/6074711</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/6074711</guid><author>lhembed</author><pubDate>Tue, 14 Dec 2010 10:07:00 +0800</pubDate><description><![CDATA[<br />阻塞操作是指在执行I/O操作时，若不能获得资源，则进程睡眠直到满足可操作的条件时再进行操作。非阻塞操作是指是执行I/O操作时，如果设备没有准备好，立即返回。<br />在Linux中，阻塞访问是通过等待队列（wait queue）来实现的。下面先简单介绍一下。<br />（一）等待队列的实现方式<br />In Linux, a wait queue is managed by means of a “wait queue head,” a structure of<br />type wait]]></description><category></category></item><item><title><![CDATA[从NFS启动Linux]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/6068583</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/6068583</guid><author>lhembed</author><pubDate>Fri, 10 Dec 2010 19:49:00 +0800</pubDate><description><![CDATA[<br />搞嵌入式的，不懂NFS，那绝对是一个悲剧。如果你连调试一个普通的Linux C程序，都要经历“编译－>打包 -> 烧写 -> 
重启”这些过程，那么你离正式产品不是一天比一天远，就是产品没出，你已经厌倦了这个工作。笔者就曾经看到一个娃，在一台内存只有512MB的机器上，装了一个VMWare虚拟机，跑了一个Red 
Hat 9来编译调试他的ARM Linux程序——我问他为什么不用NFS。他答曰，不知为何物——于是决定在这分享分享快乐喜悦的调试方法。Linux 启动过程回顾<br />有人要多]]></description><category></category></item><item><title><![CDATA[Qt/Linux 下的摄像头捕获（Video4Linux2）]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/6068512</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/6068512</guid><author>lhembed</author><pubDate>Fri, 10 Dec 2010 19:02:00 +0800</pubDate><description><![CDATA[Linux下使用各种设备是一件令人兴奋的事情。在Unix的世界里，用户与硬件打交待总是简单的。最近笔者在Linux下搞了摄像头的开发，有一点感想发于此处。Linux中操作一个设备一般都是打开（open），读取（read）和关闭（close）。使用Read的大多是一些字符型设备，然而对于显示屏或者摄像头这种字符设备而已，挨个字的读写将使得系统调用变得频繁，众所周之，系统调用对于系统而已是个不小的开销。于是有内存映射(mmap)等物，本例中将讲述在Linux下开发摄像头的一般过程以及使用Qt进行界面开发的实例。]]></description><category></category></item><item><title><![CDATA[Linux系统多线程编程]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/6001377</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/6001377</guid><author>lhembed</author><pubDate>Wed, 10 Nov 2010 22:04:00 +0800</pubDate><description><![CDATA[<br />也许大家头听过，生产者-消费者 模型吧， 就是利用线程同步的方法来实现的，本博文使用线程锁的方式来实现线程同步：<br />　　头文件：<br />　　**************************************************<br />　　*  # include <stdio.h>           *<br />　　*  # include <pthread.h>         *<br />　　*  # include <time.h>           ]]></description><category></category></item><item><title><![CDATA[Linux多点触碰协议]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/6001359</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/6001359</guid><author>lhembed</author><pubDate>Wed, 10 Nov 2010 21:57:00 +0800</pubDate><description><![CDATA[<br />为了使用功能强大的多点触控设备，一种方案是上报用户层所需的详细的手指触摸数据。这个文档所描述的多点触控协议可以让内核驱动程序向用户层上报任意多指的数据信息。<br />　　使用说明<br />　　任何一个手指的触控数据都是打包成 ABS event 包按顺序发送，只有 ABS_MT event包能作为多点触控数据被识别，调用 input_mt_sync()函数可以产生一个 SYN_MT_REPORT event ,这个函数接收并处理当前手指的信息并准备接收其它手指的触控信息。最后调用 input]]></description><category></category></item><item><title><![CDATA[获取屏幕宽度和高度]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5879259</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5879259</guid><author>lhembed</author><pubDate>Sun, 12 Sep 2010 16:11:00 +0800</pubDate><description><![CDATA[<br />QApplication::desktop()->width()  ;<br />QApplication::desktop()->height() ;<br />即得到屏幕分辨率,如1024*768,800*600.]]></description><category></category></item><item><title><![CDATA[Qt子窗口全屏显示]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5781081</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5781081</guid><author>lhembed</author><pubDate>Sun, 01 Aug 2010 16:39:00 +0800</pubDate><description><![CDATA[<br /><br />Qt全屏显示函数         window.showFullScreen()<br />Qt最大化显示函数         window.showMaximized()<br />Qt最小化显示函数         window.showMinimized()<br />Qt固定尺寸显示函数         window.resize(x,y)子窗口全屏显示：        将要全屏的Qt主窗口中的子窗口调用函数setWindowFlags(Qt::Dialog),然后调用sho]]></description><category></category></item><item><title><![CDATA[编译和移植qt-embedded-linux-opensource-src-4.5.3]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5779766</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5779766</guid><author>lhembed</author><pubDate>Sun, 01 Aug 2010 01:39:00 +0800</pubDate><description><![CDATA[最初的动机是不想使用qtopia来开发qt界面，在网上搜索到qt/embedded也是可以解决的。在网上搜索了好多关于这方面的内容，我找了一个亲身实践的来讲吧。开发平台：Ubuntu 9.10目标平台：hfrk s3c2410交叉工具：arm-linux 版本4.1.2qt版本：qt-embedded-linux-opensource-src-4.5.3 下载地址：ftp://ftp.qt.nokia.com/qt/source/qt-embedded-linux-opensource-src-4.5.3.]]></description><category></category></item><item><title><![CDATA[linphone Ubuntu下运行]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5777704</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5777704</guid><author>lhembed</author><pubDate>Fri, 30 Jul 2010 22:55:00 +0800</pubDate><description><![CDATA[http://people.ubuntu.com/~happyaron/udc-cn-dev/ch03s06.html]]></description><category></category></item><item><title><![CDATA[Liblinphone库的简介和使用]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5776293</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5776293</guid><author>lhembed</author><pubDate>Fri, 30 Jul 2010 13:26:00 +0800</pubDate><description><![CDATA[<br />liblinphone is a high level library to make a SIP phone. <br />This library includes ALL the features of linphone.<br />It is designed to be easy to use, directly from a user interface.<br />Its API is described in coreapi/linphonecore.h .<br />Makin]]></description><category></category></item><item><title><![CDATA[gcc的使用例子]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5775961</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5775961</guid><author>lhembed</author><pubDate>Fri, 30 Jul 2010 11:14:00 +0800</pubDate><description><![CDATA[<br />gcc -o hello -O2 hello.c <br /><br />-o参数指定生成的可执行程序的文件名， -O2是优化级别。该命令会编译生成hello可执行程序<br /> <br />gcc -o libhello.so -O2 -fPIC -shared hello.c <br /><br />-fPIC参数声明链接库的代码段是可以共享的，-shared参数声明编译为共享库。请注意这次我们编译的共享库的名字叫做libhello.so，这也是Linux共享库的一个命名的惯例了：后缀使用]]></description><category></category></item><item><title><![CDATA[linux下开发摄像头]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5744793</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5744793</guid><author>lhembed</author><pubDate>Sun, 18 Jul 2010 20:50:00 +0800</pubDate><description><![CDATA[这次是在linux下开发摄像头的程序,主要用的是video4linux来做的,界面用qt来实现,开始准备用frame buffer来直接写屏但是效果不怎么好,后来就用qt来做了,这样用起来效果还蛮好的,帧率也可以,可以上到30fps;运用v4l来编程主要掌握其 api,要提高帧率最重要的是用到内存映射,其实用qt和frame buffer的时候都要用到内存映射来做,只有这样才可以达到较高的帧率,不过要注意资源的利用问题.mmap后一定要munmap.对于frame buffer是很有意思的一个东西,特别是驱]]></description><category></category></item><item><title><![CDATA[qtopia-2.2.0在S3C2410上的移植过程]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5740623</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5740623</guid><author>lhembed</author><pubDate>Fri, 16 Jul 2010 19:43:00 +0800</pubDate><description><![CDATA[I.准备工作<br /><br />交叉编译工具2.95.3：<br /> arm-linux-toolchains.tgz<br /><br />所需源码包：<br /> qtopia-free-2.2.0.tar.gz<br /> jpeg-6b-src.tar.gz<br /> e2fsprogs-1.34.tar.gz<br /><br /><br /><br />II.交叉编译<br /><br />1.安装交叉编译工具<br /><br />$su<br />#cd /<br />#tar zx]]></description><category></category></item><item><title><![CDATA[Qtopia Core在嵌入式Linux上的移植及应用]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5740619</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5740619</guid><author>lhembed</author><pubDate>Fri, 16 Jul 2010 19:41:00 +0800</pubDate><description><![CDATA[<br />1 引言<br /><br />嵌入式Linux以其开放的源代码，精简高效的内核、易定制和易裁减的特征以及硬件支持广泛等优势，而深受嵌入式开发者的青睐，在消费类电子产品和工业控制、智能仪表等领域中有着广泛的应用。Qt是 Trolltech公司推出的一个跨平台的 C++图形用户界面应用程序开发框架。Qt是完全面向对象的，很容易扩展，并且允许真正的组件编程。<br /><br />Qtopia Core是适用于嵌入式 Linux 所支持的单一应用设备的主导性应用框架，能够稳定、可靠地运行于嵌入式 L]]></description><category></category></item><item><title><![CDATA[枚举类型的使用]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5728418</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5728418</guid><author>lhembed</author><pubDate>Mon, 12 Jul 2010 11:03:00 +0800</pubDate><description><![CDATA[<br />enum jit_files {<br /> JIT_BUSY,<br /> JIT_SCHED,<br /> JIT_QUEUE,<br /> JIT_SCHEDTO<br />};<br /> JIT_BUSY=1<br /> JIT_SCHEDTO=4<br /> ]]></description><category></category></item><item><title><![CDATA[使模块可以添加参数]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5728391</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5728391</guid><author>lhembed</author><pubDate>Mon, 12 Jul 2010 10:56:00 +0800</pubDate><description><![CDATA[<br />static char *whom="hello";<br />static int howmany=1;<br />module_param(howmany, int, S_IRUGO----权限：读 用户);<br />module_param(whom, charp, S_IRUGO);<br />例：insmod hello.ko howmany=10 whom="abc"]]></description><category></category></item><item><title><![CDATA[Linux内核定时器]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5728228</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5728228</guid><author>lhembed</author><pubDate>Mon, 12 Jul 2010 10:03:00 +0800</pubDate><description><![CDATA[<br />  定时器的使用非常方便，只需要执行一些初始化的操作，设置一个超时时间，指定超时发生时执行的函数，然后激活定时器就可以了。它的处理和工作队列还是有点类似的。其实，在Linux内核开发中，很多的操作都是类似的。还有一点需要注意的，内核定时器并不是周期运行，它在超时后自动销毁。因此，如果要实现周期轮询，就需要在定时器执行函数返回前再次激活定时器。<br />下面看看一个实现轮询操作的小例子： <br />    struct timer_list polling_timer; 

    ini]]></description><category></category></item><item><title><![CDATA[编译qvfb出现cannot find -lXtst解决]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5651286</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5651286</guid><author>lhembed</author><pubDate>Sun, 06 Jun 2010 17:03:00 +0800</pubDate><description><![CDATA[<br />/usr/bin/ld: cannot find -lXtst<br />
collect2: ld returned 1 exit status<br />
make: *** [../../bin/qvfb] 错误 1<br />
上面是错误情况<br />在终端执行sudo apt-get install libxtst-dev<br />然后继续编译就OK了]]></description><category></category></item><item><title><![CDATA[编译qt-x11解决QSqlRelationalDelegate问题]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5651238</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5651238</guid><author>lhembed</author><pubDate>Sun, 06 Jun 2010 16:40:00 +0800</pubDate><description><![CDATA[<br />books/bookdelegate.h:48:34:error:QSqlRelationalDelegate
: No such file or directory<br />上面是我在编译qt-x11时候遇到的问题，在编译demo的books出现这个问题，重试了好久，还是会，一开始以为是因为我多装一个QT ubuntu版本影响到，我卸载调QT，再编译，还是这个问题，干脆修改demo的Makefile，不让它编译books，ok<br />]]></description><category></category></item><item><title><![CDATA[qte4.5.2+qt creator-2009.05交叉编译环境搭建法2]]></title><link>https://blog.youkuaiyun.com/lhembed/article/details/5612572</link><guid>https://blog.youkuaiyun.com/lhembed/article/details/5612572</guid><author>lhembed</author><pubDate>Thu, 20 May 2010 22:30:00 +0800</pubDate><description><![CDATA[ 之前安装这个软件最后不是很成功，所以这次通过uncle Google又找到了另一种方法进行尝试。3x uncle Google，通过这次亲身体会到了uncle比baidu强大的地方来。                    安装环境：VMware ACE + CentOS 5.4                 交叉编译器：arm-linux-3.4.1             ]]></description><category></category></item></channel></rss>