- 博客(281)
- 资源 (1)
- 收藏
- 关注

原创 enter the linux world.
email client:Thunderbirdsnapshot: Shutterimage processing: GIMP,Illustrator.work flow: yEd,Dia.windows simulation: Wine,VirtualBox,VM Ware.browser: FireFox,Chrome.
2015-03-17 10:16:51
731
1
原创 EAVCapture项目中的开机自动升级脚本
#!/bin/bash#brief:to solve match correct event node when EAVCapture starts.#date:September 17,2015.#author:zhangshaoyan,shell.albert@gmail.com#This script is used to execute autoupdate tas
2016-01-26 15:13:57
749
原创 autoupdate script
shell.albert@beijing:~/study/test> ./run.sh 正在搜索升级服务器...搜索到服务器:172.23.140.177正在下载MD5文件...Connected to 172.23.140.177.220 Welcome to EAVCapture Server.331 User name OK, need password.230
2016-01-26 15:06:40
601
原创 终于找到你了gstreamer appsink
beijing:~ # gst-inspect-1.0 appsinkFactory Details: Rank none (0) Long-name AppSink Klass Generic/Sink Description All
2016-01-18 13:32:20
4204
原创 gstreamer插件之 v4l2src
使用qv4l2查看的摄像头支持3种分辨率,分别是640*480,320*240,160*120,所以使用gstreamer时也只能是这三种分辨率否则会出错。
2016-01-18 13:07:17
4786
2
原创 gstreamer插件之 videotestsrc
beijing:~ # gst-inspect-1.0 videotestsrcFactory Details: Rank none (0) Long-name Video test source Klass Source/Video Description
2016-01-18 11:38:22
3895
原创 RS232 四入四出模块控制代码
#ifndef ZIOMODULE_H#define ZIOMODULE_H#include #include #include #include #define ZDebugInfo 1#define ADDR_DEST 0x01const uchar zresponse_failed[]={0xA3,0x0D,0x0A,};const
2016-01-18 09:46:14
831
原创 arm 自动升级脚本
哈哈,试验成功了,效果还不错!!#SubtitleServer autoupdate script.#author:zhangshaoyan#date:January 14,2016.LocalAppFile=SubtitleServer_LocalLocalMD5File=${LocalAppFile}.md5RemoteAppFile=SubtitleServe
2016-01-14 17:30:11
771
原创 gstreamer 捕获图像+存储示例代码
找了找gstreamer的相关文档,整理了下列的代码,虽然简单,但应用这个框架应对imx6的h264硬编码足够了。#include #include static gboolean busCallBack(GstBus *bus,GstMessage *msg,gpointer data){ GMainLoop *loop=(GMainLoop*)data;
2016-01-13 10:23:59
4433
1
原创 gstreamer相关工具集合
beijing:/usr/lib/gstreamer-1.0 # gstgstack gst-discoverer-1.0 gst-inspect-1.0 gst-play-1.0 gst-visualise-0.10gst-device-monitor-1.0 gst-feedback-0.10
2016-01-12 17:16:19
6400
原创 rfkill: WLAN hard blocked
发现以下问题,上不了网了。beijing:/home/shell.albert # wpa_supplicant -iwlp8s0 -c /etc/wpa_supplicant/wpa_supplicant.confSuccessfully initialized wpa_supplicantrfkill: WLAN hard blockedrfkill: WLAN so
2016-01-12 09:36:23
3760
原创 wpa_supplicant控制脚本
#!/bin/bash#this script is used to control wpa_supplicant daemon server.#for EAVCapture iMX6 project.#by zhangshaoyan at May 26,2015.WPABIN=wpa_supplicantWIRELESSNAME=wlp5s0 #wlan0CONF
2016-01-11 16:44:36
796
原创 busybox passwd修改密码
busybox中的passwd属于精简版本的,所以跟普通Linux发行版自带的不一样。当直接使用passwd root 修改时,并不会要求输入密码。/home/zhangshaoyan/EAVCapture#passwd rootChaning password for rootNew password:passwd: password for root is unchan
2016-01-07 13:19:31
7057
原创 imx6 项目的按键驱动程序
/** * filename:imx6_key_drv.c * description: matrix key driver for imx6. * author:shell.albert@gmail.com * date: September 1,2015. * * three gpio keys are connected to imx6 through differ
2016-01-02 11:49:14
2716
原创 Qt继电器控制板代码
#ifndef ZIOMODULE_H#define ZIOMODULE_H#include #include #include #include #define ADDR_DEST 0x01const uchar zresponse_failed[]={0xA3,0x0D,0x0A,};const uchar zcmd_output1_open[]={
2015-11-11 17:20:54
1278
原创 GNU hello代码分析
GNU中的一个软件包,包名叫hello,呵呵,看来很简单啦。今天就来分析一下,GNU的目的是通过这个说明一下,GNU标准软件包所应遵守的规则,以及一些必须的测试,编译脚本文件等。俺就不分析其他的了,直接上最具价值的代码,其他忽略,这个程序实在是太小了,最重要的是一个getopt_long函数的应用,用于解析命令行参数的。#include #include "system.h
2015-11-10 15:32:14
689
原创 eclipse 导入先前存在的项目
之前在eclipse中创建过项目,但在工作区workspace中删除了,若想再重新导入,可参照如下,使用ls -al 看一下,工作目录下必须要有.cproject和.project这2个文件,这是eclipse用于管理工程的配置文件。File -> Import选择root目录后,eclipse会自动在该目录下寻找.cproject和.project这2个文件,用于决定导入哪些
2015-11-09 16:41:26
619
原创 opencv test code-1
#include "mainwidget.h"#include MainWidget::MainWidget(QWidget *parent) : QWidget(parent){ this->m_vLayout=new QVBoxLayout; this->m_hLayout=new QHBoxLayout; this->m_btnRGB=ne
2015-10-13 14:01:30
513
原创 dynamic generate command line parameters for qt embedded application
Read the fucking source code below.#include #include #include #include #include #include #include #include #define DIR_PATH "/dev/input"#define NODE_PREFIX "event"int main(
2015-09-17 11:34:16
456
原创 输入设备节点自动生成
内核使用 event(事件)机制向外抛出消息,在应用层由udev/mdev接收到事件后,根据规则自动创建设备文件。但是内核有事件时需要调用 一个程序,以执行接下来的操作,故一般使用echo /sbin/mdev > /proc/sys/kernel/hotplug mdev -s但前提是必须要挂载一些文件系统,如将/dev挂为临时文件系统,这样就不需要向Flash写数据了。好了
2015-09-01 14:34:36
867
原创 192.168.1.1/24 什么含义
192.168.1.1/24 什么含义IP的定义ip 是32位无符号整数,最小,最大分别是- 0.0.0.0- 255.255.255.255具体来说,由一个ip由 Net-ID+Host-ID 两部分组成,Net-ID 相同,那么就说明在一个网段内,可以用mac数据帧直接通信。给定一个Net-IDhost-ID全为0的ip,(192.168.2.0)代表整子小网络
2015-08-26 16:59:36
10133
原创 httpd源码分析
//这是一个简单的web服务器,分析它的主要原因是为搞明白,//web服务器(Apache,IIS等)与浏览器之间的数据交互,传输///* J. David's webserver *//* This is a simple webserver. * Created November 1999 by J. David Blackstone. * CSE 4344 (Ne
2015-08-19 13:49:48
1993
原创 10个必读的开源项目代码
1. WebbenchWebbench是一个在linux下使用的非常简单的网站压测工具。它使用fork()模拟多个客户端同时访问我们设定的URL,测试网站在压力下工作的性能,最多可以模拟3万个并发连接去测试网站的负载能力。Webbench使用C语言编写, 代码实在太简洁,源码加起来不到600行。下载链接:http://home.tiscali.cz/~cz210552/webben
2015-08-19 13:46:50
936
原创 webbench源码分析
webbench是一个网站压力测试工具,使用fork模拟多个客户端来请求http get/post,统计发送接数据的字节数,默认超时60秒。 源码还是相对简单的,最主要是得了解http请求的协议,其实也不难就是用socket发送一些规范的字符串而已。下面是对它的源码分析,全C的,效率应该是比较高的啦。by shell.albert@gmail.com/* $Id: socket
2015-08-19 10:55:10
667
原创 And that’s what the lowest level of the Libevent API does for you
libeventnone of the efficient interfaces is a ubiquitousstandard. Linux has epoll(), the BSDs (including Darwin) havekqueue(), Solaris has evports and /dev/poll…and none of theseoperating systems
2015-08-06 12:24:03
494
原创 udev和mdev hotplug事件
udev 和mdev 是两个使用uevent 机制处理热插拔问题的用户空间程序,两者的实现机理不同。udev 是基于netlink 机制的,它在系统启动时运行了一个deamon 程序udevd,通过监听内核发送的uevent 来执行相应的热拔插动作,包括创建/删除设备节点,加载/卸载驱动模块等等。mdev 是基于uevent_helper 机制的,它在系统启动时修改了内核中的uevnet_help
2015-07-17 10:54:01
1280
原创 qt5 mouseless 多种部件切换带焦点高亮显示
如此这样就能使用上下左右键移动焦点,使用确认键来操作了。想没想起来,以前的老式非智能机的时代,导航按键不就是 上下左右+确认吗???上图吧。上代码吧.#include "zpage1.h"#include int main(int argc, char *argv[]){ QApplication a(argc, argv); a.setSt
2015-07-17 10:35:59
1218
原创 qt5 mouseless 多子页面切换测试
#ifndef ZPAGE1_H#define ZPAGE1_H#include #include #include #include #include #include class ZPage1 : public QWidget{ Q_OBJECTpublic: ZPage1(QWidget *parent = 0);
2015-07-16 17:40:57
889
原创 Qt5 mouseless 测试
最近需要在一个嵌入式设备上使用物理按键跟Qt界面交互操作,在这种没有鼠标的情况下,写Qt程序就要小心了,有些东东能用,有些东东不能用,一定提前得有所考虑。简单的交互最好只使用按钮,复杂点的,因为涉及到焦点的切换。复杂点的,如果屏幕还要弹出输入法来,就更加麻烦一些了。上图吧。使用事件过滤器,将窗体所有部件的事件都集中在父窗体的事件处理函数中来处理,来决定下一个焦点切换到谁身上
2015-07-16 17:16:06
680
原创 input core输入事件 矩阵键盘 映射 原理分析
//这个是矩阵键盘映射表,使用内核定义的宏KEY()来建立//#defineKEY(row,col,val) ((((row)& (MATRIX_MAX_ROWS - 1)) //(((col)& (MATRIX_MAX_COLS - 1)) //((val)& 0xffff))//从上面的定义来看KEY用于唯一确认一个值,用于将(row,col,val)转换为一个
2015-07-08 11:20:46
2995
原创 libmad mp3 decode example code
/* * libmad - MPEG audio decoder library * Copyright (C) 2000-2004 Underbit Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms o
2015-07-06 21:25:57
1331
原创 x264 encode example code
/***************************************************************************** * example.c: libx264 API usage example *****************************************************************************
2015-07-06 21:19:10
817
原创 qt5输入的一些细节
InputWhen no windowing system is present, the mouse, keyboard and touch input are read directly via evdev or using helper libraries liketslib. Note that this requires that devices nodes
2015-07-06 17:35:43
5710
原创 imx6 WatchDog驱动程序及测试例程
/* * Watchdog driver for IMX2 and later processors * * Copyright (C) 2010 Wolfram Sang, Pengutronix e.K. * * some parts adapted by similar drivers from Darius Augulis and Vladimir * Zapo
2015-07-06 10:30:54
5350
原创 分页机制的理解
关于对分页/分段机制的理解,将本来小范围的地址扩展到更大的范围。例:假如我有10个标签,那就只能粘到10个盒子上,用来表示10个的样品。 如果我想用这10个标签表示更多的样品,那就得想办法了。比如,我们使用2个标签作为箱号,余下的8个表示样品,那样就可以出现下面的情况:
2015-06-26 11:44:53
469
原创 module_param_array
对module_param_array(name,type,num,perm)产生疑问,尤其对num参数的作用产生疑问,搜索得到结果如下。static int param_array[]= {0,0,0,0};static int param_array_nr;module_param_array(param_array , int ,¶m_array_nr ,
2015-06-25 10:49:38
831
原创 Implementing MP3 player in C
Implementing MP3 player in CSurprised by the lack of English-written articles about MP3 decoding in C,I thought that I should put down a couple of words about that.First of all, there are many w
2015-06-24 11:13:43
832
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人