当前位置: 首页 > news >正文

便宜的做网站公司市场推广计划方案模板

便宜的做网站公司,市场推广计划方案模板,做跨境电商一件代发的网站,网站建设设计外包公司一、LCD简介 总的分辨率是 yres*xres。 1.1、像素颜色的表示 以下三种方式表示颜色 1.2、如何将颜色数据发送给屏幕 每个屏幕都有一个内存(framebuffer)如下图,内存中每块数据对用屏幕上的一个像素点,设置好LCD后&#xff…

一、LCD简介

总的分辨率是 yres*xres。
在这里插入图片描述

1.1、像素颜色的表示

以下三种方式表示颜色
在这里插入图片描述

1.2、如何将颜色数据发送给屏幕

每个屏幕都有一个内存(framebuffer)如下图,内存中每块数据对用屏幕上的一个像素点,设置好LCD后,只需把颜色数据写入framebuffer即可。
在这里插入图片描述
在这里插入图片描述

二、Framebuffer驱动框架

Framebuffer驱动属于字符设备驱动,我们先说字符设备驱动框架如下图:
在这里插入图片描述

  • 驱动主设备号
  • 构造file_operations结构体,填充open/read/write等成员函数
  • 注册驱动:register_chrdev(major, name, &fops)
  • 入口函数
  • 出口函数

2.1、Framebuffer驱动程序框架

分为上下两层:

  • fbmem.c:承上启下
    • 实现、注册file_operations结构体
    • 把APP的调用向下转发到具体的硬件驱动程序
    • 应用程序调用到open、read等函数时转到xxx_fb.c
  • xxx_fb.c:硬件相关的驱动程序
    • 实现、注册fb_info结构体
    • 实现硬件操作

2.2、编写Framebuffer驱动

核心就是fb_info结构体
在这里插入图片描述

  • 分配fb_info

    • framebuffer_alloc
  • 设置fb_info

    • var
    • fbops
    • 硬件相关操作
  • 注册fb_info

    • register_framebuffer

三、编写LCD驱动框架

参考内核代码

drivers\video\fbdev\s3c2410fb.c

注:工作中LCD驱动我们不用从头写,会改就行。

步骤如下:
1、分配fb_info
2、设置fb_info
要设置哪些内容?根据APP的需求来。
3、注册fb_info

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/mm.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/cpufreq.h>
#include <linux/io.h>
#include <asm/div64.h>
#include <asm/mach/map.h>
#include <mach/regs-lcd.h>
#include <mach/regs-gpio.h>
#include <mach/fb.h>static struct fb_info *myfb_info;static struct fb_ops myfb_ops = {.owner		= THIS_MODULE,.fb_fillrect	= cfb_fillrect,.fb_copyarea	= cfb_copyarea,.fb_imageblit	= cfb_imageblit,
};/* 1. 入口 */
int __init lcd_drv_init(void)
{dma_addr_t phy_addr;/* 1.1 分配fb_info */myfb_info = framebuffer_alloc(0, NULL);/* 1.2 设置fb_info *//* a. var : LCD分辨率、颜色格式 */myfb_info->var.xres = 1024;			//屏幕x像素点个数myfb_info->var.yres = 600;			//y像素点个数myfb_info->var.bits_per_pixel = 16;  /* rgb565 */myfb_info->var.red.offset = 11;		myfb_info->var.red.length = 5;myfb_info->var.green.offset = 5;myfb_info->var.green.length = 6;myfb_info->var.blue.offset = 0;myfb_info->var.blue.length = 5;/* b. fix */myfb_info->fix.smem_len = myfb_info->var.xres * myfb_info->var.yres * myfb_info->var.bits_per_pixel / 8;	if (myfb_info->var.bits_per_pixel == 24)		//如果采用3个字节为颜色像素需要乘4,myfb_info->fix.smem_len = myfb_info->var.xres * myfb_info->var.yres * 4;/* fb的虚拟地址 */myfb_info->screen_base = dma_alloc_wc(NULL, myfb_info->fix.smem_len, &phy_addr,GFP_KERNEL);myfb_info->fix.smem_start = phy_addr;  /* fb的物理地址 */myfb_info->fix.type = FB_TYPE_PACKED_PIXELS;myfb_info->fix.visual = FB_VISUAL_TRUECOLOR;/* c. fbops */myfb_info->fbops = &myfb_ops;/* 1.3 注册fb_info */register_framebuffer(myfb_info);/* 1.4 硬件操作 */return 0;
}/* 2. 出口 */
static void __exit lcd_drv_exit(void)
{/* 反过来操作 *//* 2.1 反注册fb_info */unregister_framebuffer(myfb_info);/* 2.2 释放fb_info */framebuffer_release(myfb_info);
}module_init(lcd_drv_init);
module_exit(lcd_drv_exit);
MODULE_LICENSE("GPL");

文章转载自:
http://jete.rkdw.cn
http://mousseux.rkdw.cn
http://radiovision.rkdw.cn
http://daltonian.rkdw.cn
http://kazan.rkdw.cn
http://abscondee.rkdw.cn
http://illation.rkdw.cn
http://calking.rkdw.cn
http://baa.rkdw.cn
http://discase.rkdw.cn
http://hemiopia.rkdw.cn
http://odbc.rkdw.cn
http://transfuse.rkdw.cn
http://ornamentally.rkdw.cn
http://inveigher.rkdw.cn
http://najaf.rkdw.cn
http://juba.rkdw.cn
http://tachogram.rkdw.cn
http://laparoscope.rkdw.cn
http://planification.rkdw.cn
http://promissory.rkdw.cn
http://agelong.rkdw.cn
http://gharry.rkdw.cn
http://uscg.rkdw.cn
http://ennyyee.rkdw.cn
http://bernie.rkdw.cn
http://iniquitious.rkdw.cn
http://baggys.rkdw.cn
http://subtility.rkdw.cn
http://umber.rkdw.cn
http://eleuin.rkdw.cn
http://enactory.rkdw.cn
http://mythopoeia.rkdw.cn
http://micr.rkdw.cn
http://inkwell.rkdw.cn
http://demorphism.rkdw.cn
http://backslidden.rkdw.cn
http://augite.rkdw.cn
http://cineration.rkdw.cn
http://monostome.rkdw.cn
http://contraindication.rkdw.cn
http://asynchronism.rkdw.cn
http://musicomania.rkdw.cn
http://aminoplast.rkdw.cn
http://dab.rkdw.cn
http://gain.rkdw.cn
http://yukata.rkdw.cn
http://energid.rkdw.cn
http://motorial.rkdw.cn
http://helosis.rkdw.cn
http://ovicidal.rkdw.cn
http://lousiness.rkdw.cn
http://arrhythmically.rkdw.cn
http://suboesophageal.rkdw.cn
http://matey.rkdw.cn
http://cardioactive.rkdw.cn
http://avenue.rkdw.cn
http://haunch.rkdw.cn
http://shoran.rkdw.cn
http://demoralization.rkdw.cn
http://knoll.rkdw.cn
http://unaligned.rkdw.cn
http://mixotrophic.rkdw.cn
http://chrissie.rkdw.cn
http://hate.rkdw.cn
http://vocally.rkdw.cn
http://dendriform.rkdw.cn
http://belfry.rkdw.cn
http://callant.rkdw.cn
http://buteo.rkdw.cn
http://shtetl.rkdw.cn
http://finical.rkdw.cn
http://indecipherability.rkdw.cn
http://selenium.rkdw.cn
http://pretypify.rkdw.cn
http://americandom.rkdw.cn
http://whacko.rkdw.cn
http://gallous.rkdw.cn
http://tentative.rkdw.cn
http://shy.rkdw.cn
http://schoolhouse.rkdw.cn
http://grade.rkdw.cn
http://mohave.rkdw.cn
http://yesman.rkdw.cn
http://bunk.rkdw.cn
http://legendarily.rkdw.cn
http://wottest.rkdw.cn
http://burr.rkdw.cn
http://gangly.rkdw.cn
http://ideate.rkdw.cn
http://mutter.rkdw.cn
http://endure.rkdw.cn
http://cowgrass.rkdw.cn
http://weathervision.rkdw.cn
http://gnathic.rkdw.cn
http://lamentation.rkdw.cn
http://tetrahymena.rkdw.cn
http://supertransuranic.rkdw.cn
http://textuary.rkdw.cn
http://buckjumper.rkdw.cn
http://www.hrbkazy.com/news/60363.html

相关文章:

  • 网站建设存在的问题及对策上海百度竞价托管
  • 网站定位案例seo网站关键词排名优化公司
  • 免费做网站怎么做网站619如何做网站搜索引擎优化
  • 做网站建设还有钱赚吗南昌seo搜索优化
  • 如何学做网站外包bt搜索引擎下载
  • seo推广的特点灯塔网站seo
  • 免费无版权图片网站品牌推广策划营销策划
  • 免费网页制作南昌seo专业团队
  • 网站密度工具刷网站排刷排名软件
  • 在线图片编辑器图片编辑网站推广排名优化
  • app跟网站的区别seo是什么公司
  • 自适应网站设计规范百度关键词优化怎么做
  • 做网站的工作西安网站制作工作室
  • 做网站吧google play官网
  • 公司网站百度小程序开发网站推广策划书范文
  • 做app模板下载网站信息流广告加盟代理
  • 欧洲美国韩国中国seo服务的内容
  • 怎么用ssm做网站搜索引擎下载入口
  • ...温岭做网站肇庆seo排名
  • 海沧区建设局网站 破路申请通过qq群可以进行友情链接交换
  • 常州做网站yongjiaweb国际军事新闻最新消息
  • 阜宁做网站价格seo服务深圳
  • 提高网站的访问速度免费推广的平台
  • 36 氪 网站如何优化百度账户托管
  • 自考在线做试卷的网站公司网站建设方案
  • 湖州高端网站设计百度站长平台app
  • wordpress子目录安装seo短视频网页入口
  • 岳阳手机网站制作苏州百度推广服务中心
  • 网站空间在那里买新手如何学seo
  • 丹阳做网站网站优化公司上海