Nanopi_M1友善之臂开发板实现U盘自动挂载脚本.zip
Nanopi_M1友善之臂开发板通过脚本实现U盘自动挂载功能
cmd命令行.TXT
cmd命令行
第一章 批处理基础
第一节 常用批处理内部命令简介
第二节 常用特殊符号
第二章 FOR命令详解
第五章 set命令详解
第二节 常用特殊符号
1、@ 命令行回显屏蔽符
2、% 批处理变量引导符
3、> 重定向符
4、>> 重定向符
5、<、>&、<& 重定向符
6、| 命令管道符
7、^ 转义字符
8、& 组合命令
9、&& 组合命令
10、|| 组合命令
11、"" 字符串界定符
12、, 逗号
13、; 分号
14、() 括号
15、! 感叹号
算法导论中文版
详细的分析插入排序、分治、合并排序、以及递归等常用的算法分析
传感器 i2c spi驱动
truct spi_device *sensor_spi=NULL; //spi_device 设备结构体信息
int sensor_spi_write(unsigned int addr, unsigned int val, size_t len)
{
int status;
unsigned char write_buf[2];
write_buf[0] = addr; //在某个地址写什么值
write_buf[1] = val;
status = spi_write(sensor_spi, write_buf,2); //将数据传送到spi总线0上
if (status)
dev_err(&sensor_spi->dev, "%s error %d\n", __FUNCTION__, status);
return status;
}
dma.c驱动分析
//使用DMA 锁
/*EXPORT_SYMBOL标签内定义的函数或者符号对全部内核代码公开,不用修改内核代码就
可以在您的内核模块中直接调用,即使用EXPORT_SYMBOL可以将一个函数以符号的方式导
出给其他模块使用 */
EXPORT_SYMBOL(dma_spin_lock);
static dma_t *dma_chan[MAX_DMA_CHANNELS]; //通道对应的指针数组
//申明DMA通道选择函数为内联函数
static inline dma_t *dma_channel(unsigned int chan)
{
if(chan >= MAX_DMA_CHANNELS) //判断是否大于最大DMA通道
return NULL; //通道申请失败
else
return dma_chan[chan];//返回设置的通道
}
usb-skeleton.c驱动详细分析
/*********注册usb驱动函数框架**********/
static struct usb_driver skel_driver={
.name = "skeletonNew",//指向驱动程序名字的指针
.probe = skel_probe,//探测usb
.disconnect = skel_disconnect,//USB驱动程序中的断开处理函数
.id_table = skel_table, //指向ID设备表的指针
};
:
//usb 入口(安装)(使用usb平台总线)
static int __init usb_skel_init(void)
{
/* register this driver with the USB subsystem */
int result = usb_register(&skel_driver);//注册
if(result)
printk("usb_register failed!\n");
else
printk("usb_register successfull!\n");
return result;
}
//usb出口(卸载)
static void __exit usb_skel_exit(void)
{
/* deregister this driver with the USB subsystem */
usb_deregister(&skel_driver);//取消注册
printk("usb_deregister successfull!\n");
}
//驱动模块入口
module_init(usb_skel_init);
//驱动模块出口
module_exit(usb_skel_exit);
//遵循GPL
MODULE_LICENSE("GPL");
i2c-dev.c驱动详细分析
static int __init i2c_dev_init(void)
{
printk("i2c init ...\n");
int res = register_chrdev(I2C_MAJOR,"i2c",&i2cdev_fops);//注册设备号
if(res)
goto out;
i2c_dev_class =class_create(THIS_MODULE,"i2c-dev");//在/proc/devices下创建设备节点
if(IS_ERR(i2c_dev_class))//判断是否创建成功
{
res =PTR_ERR(i2c_dev_class);
goto out_unreg_chrdev;
}
//跟踪适配器将被添加或删除到总线之后
res = bus_register_notifier(&i2c_bus_type, &i2cdev_notifier);
if(res)
goto out_unreg_class;
//绑定到已经存在的适配器
i2c_for_each_dev(NULL,i2cdev_attach_adapter);
return 0;
out_unreg_class:
classs_destroy(i2c_dev_class);//销毁i2c类
out_unreg_chrdev:
unregister_chrdev(I2C_MAJOR,"i2c");
out:
printk(KERN_ERR "%s: Driver Initialisation failed\n",__FILE__);
return res;
}
static void __exit i2c_dev_exit(void)
{
printk("i2c exit ...\n");
bus_unregister_notifier(&i2c_bus_type,&i2cdev_notifier);//从总线上卸载I2C
i2c_for_each_dev(NULL,i2cdev_detach_adapter); //遍历销毁
class_destroy(i2c_dev_class);
unregister_chrdev(I2C_MAJOR, "i2c"); //卸载i2c驱动
}
module_init(i2c_dev_init);
module_exit(i2c_dev_exit);
MODULE_LICENSE("GPL");
lcd12864-spi驱动
S5PV210 SPI总线类型的LCD12864液晶驱动函数
usb1.0库头文件注释
usb1.0库的调用注释
ARM-LINUX平台下通过IO内存和IO端口这两种方式进行IO访问
linux为了支持多个硬件体系,在IO访问上做了自己的接口。可以通过IO内存和IO端口这两种方式进行IO访问
ubuntu 网络配置
虚拟机VM 安装的ubuntu网络配置
Uboot中start.S源码的指令级的详尽解析
详细解释uboot中的 start.S 中的每一行代码
S5PV210 spi驱动 TJC3224T022_011X 屏幕
TJC3224T022屏幕的驱动测试驱动程序(lcd12864)
友善之臂Nanopi_M1 系统镜像文件
友善之臂Nanopi_M1 系统镜像文件制作好之后,用开发板启动TF卡中debian系统,将一些开发环境配置文件拷贝到制作好的系统盘的根目录下解压Config_H3_system.tar(注意需要Linux串口终端等操作),之后执行Nanopi_H3sys_Config.sh脚本进行配置
NANOPI_M1交叉编译链安装及Eclipse IDE 安装配置
下载安装之前需要先安装Java运行环境和安装完成之后,使用下边的连接在web上直接下载eclipse IDF for C/C++,32位机下载32位的,64位机下载64位的