- 博客(28)
- 资源 (36)
- 收藏
- 关注
原创 tiny4412 设备树之按键中断(一)
使用到的引脚是XEINT26,即GPX3_2在设备树下添加节点:interrupt_int26 { compatible = "tiny4412,interrupt_int26"; tiny4412,int_gpio1 = ; };装载新的设备书后可以在sys/firmware/devicetree/ba
2017-08-31 22:00:16 2528
转载 Linux内核 kmalloc, kzalloc & devm_kzalloc 区别
首先,kzalloc()实现了kmalloc()+memset()的功能 源码如下:static inline void *kzalloc(size_t size, gfp_t flags) { return kmalloc(size, flags | __GFP_ZERO); }而 devm_kzalloc() 是具有资源管理的 kzalloc()。使用资源管
2017-08-31 17:11:22 1850
原创 linux 内核使用的主设备号
在include/uapi/linux/major.h中,说明了内核需要使用的一些主设备号,如果写驱动程序手工分配主设备号,避开这些即可。
2017-08-31 14:37:26 1781 1
原创 tiny4412 配置dm9621网卡
用到的工具:http://blog.csdn.net/qq_33160790/article/details/77677803本博客在配置内核支持设备树后(即:已在tiny4412上运行linux4.4内核,但网卡驱动未配置),基于http://www.cnblogs.com/pengdonglin137/p/5153794.html(修改内核)如果还未在tiny4412上运行设备
2017-08-31 00:00:25 3385
转载 arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别
命名规则交叉编译工具链的命名规则为:arch [-vendor] [-os] [-(gnu)eabi]arch - 体系架构,如ARM,MIPSvendor - 工具链提供商os - 目标操作系统eabi - 嵌入式应用二进制接口(Embedded Application Binary Interface)根据对操作系统的支持与否,ARM GCC可分为支持和不支持操作系统,
2017-08-29 15:55:14 1372
原创 tiny4412 工具链接
硬件平台:tiny4412(1611)系统:linux-4.4 https://www.kernel.org/pub/linux/kernel/v4.x/ 下载 linux-4.4.tar.gz 文件系统:busybox-1.25编译器: arm-none-linux-gnueabi-gcc (gcc version 4.8.3 20140320)https://pan.baidu.co
2017-08-29 14:41:37 1597
原创 ubuntu16 dnw for tiny4412
工具下载链接:http://download.csdn.net/download/qq_33160790/9954335如果是ubuntu12工具应该能make然后直接使用,在ubuntu16编译会报错(需要修改驱动的makefile):make -C /lib/modules/`uname -r`/build M=`pwd`/src/driver modulesmake[1]: Entering...
2017-08-29 14:16:22 2860 1
原创 device_create创建设备节点分析
在驱动中经常可以看到类似下面的话:adb_dev_class = class_create(THIS_MODULE, "adb");device_create(adb_dev_class, NULL, MKDEV(ADB_MAJOR, 0), NULL, "adb");那么device_create调用什么函数创建设备节点,继续分析struct device *device_create
2017-08-26 21:51:43 3315
转载 字符设备驱动之register_chrdev_region()系列
1.内核中所有已分配的字符设备编号都记录在一个名为 chrdevs 散列表里。该散列表中的每一个元素是一个char_device_struct 结构,它的定义如下:static struct char_device_struct {struct char_device_struct *next; // 指向散列冲突链表中的下一个元素的指针unsigned int major;
2017-08-26 15:05:34 2188
原创 v4l2 核心分析 (待续)
v4l2核心是构建一个内核中标准视频设备驱动的框架,为视频操作提供统一的接口函数,由v4l2-dev.c实现,主要作用申请字符主设备号、注册class和提供video device注册注销等相关函数。涉及到的结构体:struct v4l2_file_operations { struct module *owner; ssize_t (*read) (struct file *,
2017-08-25 14:56:54 1696
原创 指针常量 常量指针
指针常量(指向常量的指针):const int *pa;int const *pa;两者等价。因为指向常量的指针有时候会指向常量,所以它具有这个性质:“不能靠解引用改变它指向的对象的值”,以此保护它所指向的常量的常量性。*pa =d; // 不可行(d是已经声明过的整型)但指针本身的值是可变的:pa=& d; // 可行(d是已经声明过的整型)
2017-08-25 11:33:31 1379
原创 v4l2 ioctl框架分析
v4l2的ioctl框架由drivers/media/v4l2-ioctl.c实现涉及到的结构体:struct v4l2_ioctl_ops { /* ioctl callbacks */ /* VIDIOC_QUERYCAP handler */ int (*vidioc_querycap)(struct file *file, void *fh, struct v4l2_cap
2017-08-24 20:45:23 2243
转载 Linux内核中_IO,_IOR,_IOW,_IOWR宏的用法与解析
在驱动程序里, ioctl()函数上传送的变量 cmd是应用程序用于区别设备驱动程序请求处理内容的值。cmd除了可区别数字外,还包含有助于处理的几种相应信息。 cmd的大小为 32位,共分 4 个域: bit31~bit30 2位为 “区别读写”区,作用是区分是读取命令还是写入命令。 bit29~bit15 14位为 "数据大小"区,表示 ioctl()中的 arg变量传送
2017-08-24 20:10:46 1417
原创 Ubuntu如何添加删除PPA
实例:错误的安装ppa导致每次更新源都会载最后出现无法下载大情况,例如执行下面的命令:sudo apt-get update 出现 以下 错 误:Failed to fetch http://ppa.launchpad.net/openjdk-r/ppa/ubuntu/dists/yakkety/main/binary-amd64/Packages 404 Not FoundE:
2017-08-24 10:25:33 1415
原创 ubuntu16 修改下载源
国内有很多ubuntu的源,包括:网易源(这个之前用过,速度很快的),阿里源,还有很多教育网的源,如:清华源,中科大源。 编辑/etc/apt/sources.list文件, 在文件最前面添加以下条目(操作前请做好相应备份):deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe mult
2017-08-24 10:23:29 1512
原创 ubuntu16安装jdk1.7
1.卸载系统中原有版本apt-get remove openjdk*2.下载jdk1.7http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html3.安装mkdir /usr/lib/javacp jdk-7u79-linux
2017-08-24 10:19:03 1985
转载 Linux 下的dd命令使用详解以及dd if=/dev/zero of=的含义
一、dd命令的解释dd:用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换。注意:指定数字的地方若以下列字符结尾,则乘以相应的数字:b=512;c=1;k=1024;w=2参数注释:1. if=文件名:输入文件名,缺省为标准输入。即指定源文件。2. of=文件名:输出文件名,缺省为标准输出。即指定目的文件。3. ibs=bytes:一次读入by
2017-08-22 21:33:55 131773 4
转载 4412dnw下载内核到emmc
1 下载附件dnw编译,上面已经讲了,2 按照友善文档,制作SD启动卡,开发板SW2开关选择SD启动.3 把串口先连接PC与开发板。4 插制作好的SD卡到开发板,并给开发板上电SW1.5 键盘按任意键盘进入uboot终端,此时输入help可以看到很多指令。6 现在我们进入了SD卡模式启动的u-boot. 现在我们看下mmc设备信息:u-boot模式下输入:>mmci
2017-08-21 20:21:39 1686
转载 Java 中extends与implements使用方法
初学Java语言, 代码中的extends和implements让我感到很迷惑,现在终于弄明白它们之间的区别和用法了。[c-sharp] view plain copy//定义一个Runner接口 public inerface Runner { int ID = 1; void run ();
2017-08-16 16:12:22 1666
原创 Android layout属性大全
第一类:属性值 true或者 false Android:layout_centerHrizontal 水平居中 android:layout_centerVertical 垂直居中 android:layout_centerInparent 相对于父元素完全居中 android:layout_alignParentBo
2017-08-16 11:14:27 1361
原创 xml布局文件常用属性
a)、第一类:属性值为true或false android:layout_centerHrizontal 水平居中 android:layout_centerVertical 垂直居中 android:layout_centerInparent 相对于父元素完全居中 android:layout_alignParentBottom 贴紧父元素的下边缘 android:
2017-08-16 09:54:11 1472
原创 Android studio报错
'tools.jar' seems to be not in Android Studio classpath.Please ensure JAVA_HOME points to JDK rather than JRE.解法:在系统变量【java_home :D:\qiyi\jdk1.7】后添加 “\”, 即【java_home :D:\qiyi\jdk1.7\】
2017-08-15 19:07:22 1908
原创 ubuntu安卓开发环境初始化
(1) 启动控制终端的方法 如下图,点击左边第 1 个图标,在中间顶部输入框中输入“term”,可以在下边看到名为 “Terminal”的应用程序图标,点击它即可启动控制终端。 (2) 安装、配置网络服务: 执行以下命令安装 ftp、ssh、nfs 服务 sudo apt-get update // 这个命令在安装Ubuntu后只需要执行一次 sudo apt-get ins
2017-08-12 15:22:17 1349
转载 RGB转灰度的几种算法
这里我用的摄像头是OV2640,这款摄像头的像素是200万。通过对摄像头拍摄图像的进行图像的转化,先把图像的格式转化为RGB565,然后在进行灰度的转化,最后进行二值化处理,设定阈值,进行二值化的处理,通过设置二值化的位数可以提高二值化的精度,使二值化的效果更加清晰,我用的OV2640可以对焦距进行调节,这样的话,可以使拍摄的图像的效果更加完善。大家可以根据自己的摄像头进行设置。我看了飞思卡尔的K
2017-08-10 22:52:50 1956
原创 stm32f103 RCC_MCOConfig函数
STM32的PA.8引脚具有复用功能——时钟输出(MCO), 该功能能将STM32内部的时钟通过PA.8输出.操作流程:1)、设置PA.8为复用Push-Pull模式。GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_InitStructu
2017-08-10 18:34:11 6628
原创 stm32printf函数调用
一、对工程属性进行配置,详细步骤如下1、首先要在你的main 文件中 包含“stdio.h” (标准输入输出头文件)。2、在main文件中重定义函数 如下:// 发送数据int fputc(int ch, FILE *f){USART_SendData(USART1, (unsigned char) ch);// USART1 可以换成 USART2
2017-08-07 08:01:36 1927
原创 stm32f103串口程序
#include "stm32f10x.h"void Delay(u32);void fputc(u8);void uart_init(u32);int main(void){ GPIO_InitTypeDef GPIO_InitStructure; NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2); //ÉèÖ
2017-08-05 23:40:33 3186
原创 STM32F103的GPIO配置方式
一、GPIO的配置过程(1)、开启外设时钟(2)、初始化GPIO配置成输出模式程序void GPIO_Config(void){GPIO_InitTypeDef GPIO_InitStruce;//结构体属于变量,变量的声明必须位于函数可执行的语句之前RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, E
2017-08-05 04:55:42 7758 1
stm32f103超声波测距
2017-12-22
VMwareTools-9.6.0-1294478.tar.gz
2017-10-16
mkbooting和unpackbootimg适用于ubuntu
2017-10-11
dragon board 410c 中文开发文档
2017-10-11
tiny4412内核补丁dm9621
2017-08-31
qemu内核调试环境文件系统
2018-07-25
vim配置for ubuntu
2018-07-22
keil5——51
2018-03-22
STM32F103VET6 usart demo
2018-03-10
Micrium_STM32xxx_uCOS-II
2018-03-08
Cortex™ -A Series Version: 3.0 Programmer’s Guide
2018-03-08
i2c-tools-distrotech-i2c-tools
2018-03-07
2440根文件系统
2018-02-07
glibc-2.23.tar.bz2
2018-02-05
QEMU使用手册
2018-02-03
jz2440 u'boot
2018-01-21
工程文件....
2018-01-13
jz2440使用的kernel
2018-01-13
Jz2440v2对应的uboot
2018-01-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人