自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

转载 Android :ExpandableListActivity

http://developer.android.com/reference/android/app/ExpandableListActivity.html# public class ExpandableListActivityextends Activityimplements View.OnCreateContextMenuListener ExpandableListView...

2013-11-10 19:07:00 118

转载 Google Gapps – Download Gapps for Android【转】

http://wiki.rootzwiki.com/Google_Apps  http://productforums.google.com/forum/#!forum/apps http://www.google.com/enterprise/apps/business/ http://www.hongkiat.com/blog/google-app-mail-for-free/ ht...

2013-11-06 10:38:00 897

转载 Power Profiles for Android

http://source.android.com/devices/tech/power.html Battery usage information is derived from battery usage statistics and power profile values. Battery Usage Statistics Battery usage statist...

2013-11-04 23:01:00 210

转载 Android设备相关配置

http://source.android.com/devices/tech/storage/index.html Android supports devices with external storage, which is defined to be a case-insensitive filesystem with immutable POSIX permission cl...

2013-11-02 14:31:00 143

转载 C++版“简单工厂模式”实例代码

#include <iostream>using namespace std; const int apple_size = 10;const int banana_size = 20; //********************************fruit interface class fruit{public: virtual void name(...

2012-08-01 19:54:00 96

转载 linux中数组的编码风格

#include <stdio.h> struct st_test{ int a; int b;}; enum{ one, two,}; struct st_test tt[2]={ [two] = { .b=1, .a=0...

2012-08-01 19:22:00 80

转载 热插拔事件触发自定义行为

1、热插拔事件的产生 在编写的总线驱动程序的.uevet处理函数中通过环境变量上报给udevd2、udev信息查看 udevinfo –a –p /sys/devices/XXX3、udev规则的添加 如果想让事件触发自定义的行为,需在/etc/udev/rules.d目录下添加新的规则 例如添加文件99-zy.rules...

2012-07-09 14:33:00 131

转载 Linux电源管理

PM notifier机制: 应用场景: There are some operations that subsystems or drivers may want to carry out before hibernation/suspend or after restore/resume, but they require the system to be fully functi...

2012-06-05 15:47:00 85

转载 Android GestureDetector机制要点解析

1、需要的记录的信息 载体是java侧是类MotionEvent,cpp侧是gPointerCoordsClassInfo 记录的信息包括: public float x;public float y;public float pressure;public float size;public float touchMajor;public float touchMinor;publi...

2012-06-01 17:18:00 117

转载 Linux cpufreq驱动框架

动态电源管理(DPM)是很一个广泛的概念,很多系统实际上都采用了动态电源管理(DPM)方式。Linux很早就采用了动态电源管理,在driver目录下有个cpufreq的驱动程序,它就是用来动态调整CPU频率以降低能源消耗的。[1] 注:引文中说的不全对,cpufreq在平板中有采用,并不是不适用与嵌入式系统。 #include <linux/kernel.h> #incl...

2012-06-01 17:13:00 225

转载 Java没有头文件的原因

java中采用import的方式导入.class文件,.class文件中包含类的方法、属性等的定义,因此不在需要.h头文件,而c或c++编译后的二进制代码不包含函数和类的信息,为了在编译时进行函数格式合法性检查,采用.h的文件给出。 java提供给用户的是.class文件,虽然包含类的完整信息,但是对于开发者“不可读”,因此还需要以文档的方式提供类的声明。 参考: [1] http://...

2012-06-01 11:20:00 598

转载 驱动编译Makefile

fneq ($(KERNELRELEASE),) obj-m := timer.oelse all: make -C /lib/modules/3.0.8/build M=$(shell pwd) modules.PHONY:cleanclean: rm -rf *.mod.c *.o *.ko *.symvers *.order endi...

2012-05-31 14:54:00 128

转载 封装printf打印位置信息/符号##和#功能测试

相关代码(函数名print_encapsule.c): #include <stdio.h> #define DPRINT(fmt,args...) \ printf("%s-%s-%d:"fmt,__FILE__,__func__,__LINE__,args)#define TESTA(a,b) a##b#define TESTB(str) #str int main...

2012-05-31 10:45:00 152

转载 利用gcc编译选项和宏定义控制代码条件编译

示例代码(文件compile_macro_test.c): #include <stdio.h> int main(){ int a = 0;#ifdef DBUG a = 5;#endif printf("=========%d\n",a); return 0;} 对应Makefile文件 all:...

2012-05-31 10:23:00 328

转载 Android中计算坐标变换速度的原理

采用最小二乘法对获取的坐标X,Y时间序列进行回归拟合。 对于X时间序列(xi,ti):xi=b0+b1*ti+b2*ti^2+...+bm*ti^m,可得如下等式 A*B=Y----------(1) 其中,(带t的表示矩阵的转置) 矩阵B为拟合后要求解的系数矩阵(b0 b1 b2 ... bn)t 矩阵A为 1 ...

2012-05-30 14:43:00 378

转载 Linux设备驱动---Kset

实验内核版本3.0.8 一个简单的kset测试代码 #include <linux/kernel.h>#include <linux/module.h>#include <linux/init.h>#include <linux/kobject.h> MODULE_LICENSE("Dual BSD/GPL"); /* * struc...

2012-05-28 16:26:00 94

转载 Linux设备驱动---Kobject

尽管采用C语言实现,但Linux设计实现中很多地方都体现着面向对象的思想。Kobject可以看做是Linux设备对象的基类,单独的Kobject没有太多的意义,它只有嵌入到对象结构体中才流光四射。它的一般用法如下: struct my_obj { struct kobject; ……./* 其他自定义结构体成员*/ }; Kobject的一个重要作用是...

2012-05-25 16:54:00 99

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除