移植树莓派中的fbtft显示驱动到Linux开发板下(三)-参数传递
来源:互联网 发布:删除数组中重复元素 编辑:程序博客网 时间:2024/06/07 07:44
在fbtft显示驱动fbtft_device.c下有很多待传入的参数,如name设备名称,用它来匹配寻找你的对应的显示屏驱动
了解一下传参的函数:
module_param(name,type,perm);
static char *name;
module_param(name, charp, 0);
MODULE_PARM_DESC(name, "Devicename (required). name=list => list all supported devices.");
name:传入的设备名称,用来匹配对应的显示屏驱动程序
static unsigned int rotate;
module_param(rotate, uint, 0);
MODULE_PARM_DESC(rotate,"Angle to rotate display counter clockwise: 0, 90, 180, 270");
rotate:顺时针方向旋转显示计数器
static unsigned int busnum;
module_param(busnum, uint, 0);
MODULE_PARM_DESC(busnum, "SPI bus number (default=0)");
busnum:spi的总线号
static unsigned int cs;
module_param(cs, uint, 0);
MODULE_PARM_DESC(cs, "SPI chip select (default=0)");
cs:spi总线的片选信号
static unsigned int speed;
module_param(speed, uint, 0);
MODULE_PARM_DESC(speed, "SPI speed (override device default)");
speed:spi总线的通信速率
static int mode = -1;
module_param(mode, int, 0);
MODULE_PARM_DESC(mode, "SPI mode (override device default)");
mode:spi总线的通信模式
static char *gpios;
module_param(gpios, charp, 0);
MODULE_PARM_DESC(gpios,
"List of gpios. Comma separated with the form: reset:23,dc:24 (when overriding the default, all gpios must be specified)");
gpios:gpio端口
static unsigned int fps;
module_param(fps, uint, 0);
MODULE_PARM_DESC(fps, "Frames per second (override driver default)");
fps:图像帧每秒
static char *gamma;
module_param(gamma, charp, 0);
MODULE_PARM_DESC(gamma,
"String representation of Gamma Curve(s). Driver specific.");
gamma:未知
static int txbuflen;
module_param(txbuflen, int, 0);
MODULE_PARM_DESC(txbuflen, "txbuflen (override driver default)");
tcbuflen:发送缓冲区的的长度
static int bgr = -1;
module_param(bgr, int, 0);
MODULE_PARM_DESC(bgr,
"BGR bit (supported by some drivers).");
bgr:BGR bit
static unsigned int startbyte;
module_param(startbyte, uint, 0);
MODULE_PARM_DESC(startbyte, "Sets the Start byte used by some SPI displays.");
startbyte:设置一些SPI显示使用的开始字节
static bool custom;
module_param(custom, bool, 0);
MODULE_PARM_DESC(custom, "Add a custom display device. Use speed= argument to make it a SPI device,else platform_device");
custom:添加一个自定义显示设备
static unsigned int width;
module_param(width, uint, 0);
MODULE_PARM_DESC(width, "Display width, used with the custom argument");
width:显示宽度
static unsigned int height;
module_param(height, uint, 0);
MODULE_PARM_DESC(height, "Display height, used with the custom argument");
height:显示高度
static unsigned int buswidth = 8;
module_param(buswidth, uint, 0);
MODULE_PARM_DESC(buswidth, "Display bus width, used with the custom argument");
buswidth:总线的宽度
static int init[FBTFT_MAX_INIT_SEQUENCE];
static int init_num;
module_param_array(init, int, &init_num, 0);
MODULE_PARM_DESC(init, "Init sequence, used with the custom argument");
static unsigned long debug;
module_param(debug, ulong, 0);
MODULE_PARM_DESC(debug,"level: 0-7 (the remaining 29 bits is for advanced usage)");
static unsigned int verbose = 3;
module_param(verbose, uint, 0);
MODULE_PARM_DESC(verbose,"0 silent, >0 show gpios, >1 show devices, >2 show devices before (default=3)");
- 移植树莓派中的fbtft显示驱动到Linux开发板下(三)-参数传递
- 移植树莓派中的fbtft显示驱动到Linux开发板下(四)-fbtft中的数据结构
- 移植树莓派中的fbtft显示驱动到Linux开发板下(一)
- 移植树莓派中的fbtft显示驱动到Linux开发板下(二)
- struts开发<struts中的参数传递.三>
- Linux驱动移植(三)——从Linux内核2.4移植到linux内核2.6(待完善)
- Linux下移植motion到6410开发板(移动图像监测系统)
- Android中的Http通信(三)之get、post传递参数到服务器
- Linux应用程序开发(三)---移植kvm到arm linux
- 【引用】Linux应用程序开发(三)---移植kvm到arm linux
- 在Linux下用 shell 命令把命令行中的参数逆序显示出来(三种方法)
- linux下的spi驱动及测试程序移植开发
- linux下USB驱动移植
- linux下移植RT3070 驱动
- Linux下触摸屏驱动移植
- Linux下音频设备驱动移植
- Linux 下蓝牙驱动移植
- Linux 下 RT3070 驱动移植
- springboot url拦截定制
- Discuz 文件上传100%自动取消上传
- sqlserver 更新表统计信息
- CSS3 控制网页背景色渐变
- 重装 11G(11.2.0.4) ORDIM组件
- 移植树莓派中的fbtft显示驱动到Linux开发板下(三)-参数传递
- 初次接触Maven的开发者,该如何新建Maven工程听语音
- JAVA多线程和并发基础面试问答(转载)
- photo cc 创作了一幅秋韵,请欣赏!
- HDU1085(母函数模板)
- ROS中使用激光雷达(EAI F4)
- Java 异常机制,异常的结构,运行时异常和非运行时异常
- HTTP2与HTTP1.1的区别
- 多线程成本