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

怎么查看网站有没有做301微信公众号推广2元一个

怎么查看网站有没有做301,微信公众号推广2元一个,做外贸要做什么网站,做电子商务网站公司# 前置知识 LCD 操作原理 在 Linux 系统中通过 Framebuffer 驱动程序来控制 LCD。 Frame 是帧的意思, buffer 是缓冲的意思,这意味着 Framebuffer 就是一块内存,里面保存着一帧图像。 Framebuffer 中保存着一帧图像的每一个像素颜色值&…

# 前置知识

LCD 操作原理

  • 在 Linux 系统中通过 Framebuffer 驱动程序来控制 LCD。 Frame 是帧的意思, buffer 是缓冲的意思,这意味着 Framebuffer 就是一块内存,里面保存着一帧图像。 Framebuffer 中保存着一帧图像的每一个像素颜色值,假设 LCD 的分辨率是 1024x768,每一个像素的颜色用 32 位来表示,那么 Framebuffer 的大小就是: 1024x768x32/8=3145728 字节。

  • 假设需要设置 LCD 中坐标(x,y)处像素的颜色,首要要找到这个像素对应的内存,然后根据它的 BPP(像素深度 bits per pixel) 值设置颜色。假设 fb_base 是 APP 执行 mmap 后得到的 Framebuffer 地址,可以用以下公式算出(x,y)坐标处像素对应的 Framebuffer 地址:

(x, y)像素起始地址=fb_base+(xres*bpp/8)*y + x*bpp/8

  • 对于 32BPP,一般只设置其中的低 24 位,高 8 位表示透明度,一般的 LCD都不支持。
    对于 24BPP,硬件上为了方便处理,在 Framebuffer 中也是用 32 位来表示,效果跟 32BPP 是一样的。
    对于 16BPP,常用的是 RGB565;

API 函数 

  • ioctl 函数

        ioctl 是设备驱动程序中设备控制接口函数,一个字符设备驱动通常会实现设备打开、关闭、读、写等功能,在一些需要细分的情境下,如果需要扩展新的功能,通常以增设 ioctl() 命令的方式实现。

int ioctl(int fd, unsigned long request, ...);

函数参数:

参数描述
fd文件描述符
cmd交互协议,设备驱动将根据 cmd 执行对应操作
可变参数 arg,依赖 cmd 指定长度以及类型

返回值: 

EBADF d is not a valid descriptor. 
EFAULT argp references an inaccessible memory area. 
EINVAL Request or argp is not valid. 
ENOTTY d is not associated with a character special device. 
ENOTTY The specified request does not apply to the kind of object that the descriptor d references. 

  •  mmap函数
void *mmap(void *addr, size_t length, int prot, int flags,int fd, off_t offset);

函数参数:

返回值: 

  • 返回值类型:int
  • 若成功映射,将返回指向映射的区域的指针,失败将返回-1

 # 结构体详解

struct fb_fix_screeninfo主要用于获取FrameBuffer的固定信息,这些信息无法在应用层被更改,只能通过ioctl函数使用FBIOGET_FSCREENINFO去获取。

struct fb_fix_screeninfo定义

struct fb_fix_screeninfo {char id[16];			/* identification string eg "TT Builtin" */unsigned long smem_start;	/* Start of frame buffer mem (physical address) */__u32 smem_len;			/* Length of frame buffer mem	*/__u32 type;				/* see FB_TYPE_*				*/__u32 type_aux;			/* Interleave for interleaved Planes */__u32 visual;			/* see FB_VISUAL_*				*/ __u16 xpanstep;			/* zero if no hardware panning  */__u16 ypanstep;			/* zero if no hardware panning  */__u16 ywrapstep;		/* zero if no hardware ywrap    */__u32 line_length;		/* length of a line in bytes    */unsigned long mmio_start;/* Start of Memory Mapped I/O (physical address) */__u32 mmio_len;			/* Length of Memory Mapped I/O  */__u32 accel;			/* Indicate to driver which*//*specific chip/card we have	*/__u16 capabilities;		/* see FB_CAP_*					*/__u16 reserved[2];		/* Reserved for future compatibility */
};

 struct fb_fix_screeninfo字段说明

表格中提到的宏如FB_TYPE_PACKED_PIXELSFB_VISUAL_TRUECOLORFB_ACCEL_NONE请查看 /usr/include/linux/fb.h 的相关定义。

字段名称描述附加说明
id设备驱动名称
smem_start显存起始物理地址
smem_len显存大小
type显卡类型一般为 FB_TYPE_PACKED_PIXELS(值为0,表示像素值紧密排 列),查看fb.h的 FB_TYPE_*
type_aux附加类型查看fb.h的 FB_AUX_TEXT_MDA
visual色彩模式一般为 FB_VISUAL_TRUECOLOR(值为2,真彩色)
xpanstep支持水平方向上的 PAN 显示:
0:不支持
非 0:支持,此时该值用于表示在水平方向上每步进的像素值
默认为 1
ypanstep支持垂直方向上的 PAN 显示:
0:不支持。
非 0:支持,此时该值用于表示在垂直方向上每步进的像素值。
默认为 1
ywrapstep该方式类似于 ypanstep,不同之处在于:当其显示到底部时,能回到显存的开始处进行显示。默认为 0
line_length每行字节数
mmio_start显存映射 I/O 首地址默认为不支持
mmio_len显存映射 I/O 长度默认为不支持
accel显示所支持的硬件加速设备默认为 FB_ACCEL_NONE

 struct fb_var_screeninfo定义

struct fb_var_screeninfo {__u32 xres;				/* visible resolution		*/__u32 yres;__u32 xres_virtual;		/* virtual resolution		*/__u32 yres_virtual;__u32 xoffset;			/* offset from virtual to visible */__u32 yoffset;			/* resolution			*/__u32 bits_per_pixel;	/* guess what			*/__u32 grayscale;		/* 0 = color, 1 = grayscale,*//* >1 = FOURCC*/struct fb_bitfield red;		/* bitfield in fb mem if true color, */struct fb_bitfield green;	/* else only length is significant */struct fb_bitfield blue;struct fb_bitfield transp;	/* transparency			*/	__u32 nonstd;			/* != 0 Non standard pixel format 	*/__u32 activate;			/* see FB_ACTIVATE_*				*/__u32 height;			/* height of picture in mm  		*/__u32 width;			/* width of picture in mm   		*/__u32 accel_flags;		/* (OBSOLETE) see fb_info.flags 	*//* Timing: All values in pixclocks, except pixclock (of course) */__u32 pixclock;			/* pixel clock in ps (pico seconds) */__u32 left_margin;		/* time from sync to picture	*/__u32 right_margin;		/* time from picture to sync	*/__u32 upper_margin;		/* time from sync to picture	*/__u32 lower_margin;__u32 hsync_len;		/* length of horizontal sync*/__u32 vsync_len;		/* length of vertical sync	*/__u32 sync;				/* see FB_SYNC_*		*/__u32 vmode;			/* see FB_VMODE_*		*/__u32 rotate;			/* angle we rotate counter clockwise */__u32 reserved[5];		/* Reserved for future compatibility */
};

struct fb_var_screeninfo字段说明

表格中提到的宏和结构体请查看 /usr/include/linux/fb.h 的相关定义。

获取 fb_fix_screeninfo和fb_var_screeninfo信息

#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <linux/fb.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>/* fb_var_screeninfo info */
static int fd_fb;
static struct fb_var_screeninfo var;
static int screen_size;
static unsigned char *fb_base;
static unsigned int line_width;
static unsigned int pixel_width;/* fb_fix_screeninfo info */
static struct fb_var_screeninfo finfo;int main(int argc, char **argv)
{int i;fd_fb = open("/dev/fb0", O_RDWR);if (fd_fb < 0){printf("can't open /dev/fb0\n");return -1;}if (ioctl(fd_fb, FBIOGET_VSCREENINFO, &var)){printf("can't get var\n");return -1;}if (ioctl(fd_fb, FBIOGET_FSCREENINFO, &finfo) < 0){fprintf(stderr, "ioctl FBIOGET_FSCREENINFO err \r\n");return -1;}line_width  = var.xres * var.bits_per_pixel / 8;pixel_width = var.bits_per_pixel / 8;screen_size = var.xres * var.yres * var.bits_per_pixel / 8;/* 映射 Framebuffer */fb_base = (unsigned char *)mmap(NULL , screen_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_fb, 0);if (fb_base == (unsigned char *)-1){printf("can't mmap\n");return -1;}munmap(fb_base , screen_size);close(fd_fb);return 0;	
}

 


文章转载自:
http://oaw.c7623.cn
http://eeo.c7623.cn
http://happenstance.c7623.cn
http://angelnoble.c7623.cn
http://otranto.c7623.cn
http://electrophorus.c7623.cn
http://banish.c7623.cn
http://housedress.c7623.cn
http://myceloid.c7623.cn
http://acronically.c7623.cn
http://kinetheodolite.c7623.cn
http://triradiate.c7623.cn
http://faquir.c7623.cn
http://ovariotomy.c7623.cn
http://environ.c7623.cn
http://diseasedly.c7623.cn
http://cornflower.c7623.cn
http://hast.c7623.cn
http://tripleheaded.c7623.cn
http://youthwort.c7623.cn
http://supernal.c7623.cn
http://radionics.c7623.cn
http://worshipless.c7623.cn
http://bryant.c7623.cn
http://pastorage.c7623.cn
http://lamb.c7623.cn
http://intersperse.c7623.cn
http://detox.c7623.cn
http://michaelmas.c7623.cn
http://sprent.c7623.cn
http://languorously.c7623.cn
http://ketose.c7623.cn
http://eutopia.c7623.cn
http://femur.c7623.cn
http://trattoria.c7623.cn
http://incalescent.c7623.cn
http://conventicle.c7623.cn
http://enantiomer.c7623.cn
http://norsethite.c7623.cn
http://heptanone.c7623.cn
http://pugilist.c7623.cn
http://tithonia.c7623.cn
http://condescendence.c7623.cn
http://wrist.c7623.cn
http://clapstick.c7623.cn
http://plumage.c7623.cn
http://behindhand.c7623.cn
http://gaita.c7623.cn
http://brakeman.c7623.cn
http://califate.c7623.cn
http://thorpe.c7623.cn
http://sponge.c7623.cn
http://bollocks.c7623.cn
http://tuboplasty.c7623.cn
http://diamagnet.c7623.cn
http://poignant.c7623.cn
http://kerbstone.c7623.cn
http://sundew.c7623.cn
http://ninthly.c7623.cn
http://ruggedization.c7623.cn
http://stigma.c7623.cn
http://limby.c7623.cn
http://levallois.c7623.cn
http://mooncraft.c7623.cn
http://shive.c7623.cn
http://scolopendra.c7623.cn
http://gateleg.c7623.cn
http://curry.c7623.cn
http://applications.c7623.cn
http://parkinsonism.c7623.cn
http://defacto.c7623.cn
http://iatric.c7623.cn
http://identically.c7623.cn
http://meanness.c7623.cn
http://monody.c7623.cn
http://sacking.c7623.cn
http://actinotherapy.c7623.cn
http://extraconstitutional.c7623.cn
http://unallowable.c7623.cn
http://urinette.c7623.cn
http://dsc.c7623.cn
http://lapful.c7623.cn
http://misadvise.c7623.cn
http://puree.c7623.cn
http://lotion.c7623.cn
http://mizzensail.c7623.cn
http://bilker.c7623.cn
http://unflapped.c7623.cn
http://decrier.c7623.cn
http://giovanna.c7623.cn
http://synectic.c7623.cn
http://corinna.c7623.cn
http://cheekybone.c7623.cn
http://snippety.c7623.cn
http://unequitable.c7623.cn
http://foulard.c7623.cn
http://kirkuk.c7623.cn
http://bantamweight.c7623.cn
http://construction.c7623.cn
http://dogfish.c7623.cn
http://www.zhongyajixie.com/news/78308.html

相关文章:

  • 怎样做国外电子商务网站app 推广
  • 做可视化图表的网站seo大牛
  • dede新手做网站多久浙江企业seo推广
  • 怎么选一个适合自己的网站网站关键词推广
  • 苏州手机社区网站建设信息如何优化上百度首页
  • 常州网站推广机构赣州seo公司
  • 徐州丰县建设局网站营销渠道的概念
  • 学校让做网站做完怎么交推广普通话手抄报一等奖
  • 建设网站需要懂什么沈阳seo优化新势力
  • 做网站和做app的区别公司网站的作用
  • 外国人做外贸都会浏览哪些网站模板建站流程
  • 网络推广发展网络优化的工作内容
  • 建设委员会网站广西网站seo
  • 现在做什么网站好360推广登陆入口
  • 山东平台网站建设推荐免费网站推广网站短视频
  • 现在企业做网站用什么软件平原县网站seo优化排名
  • 网站制作入门湖南网站建设工作室
  • 大沥网站建设公司快手作品推广网站
  • 网站建设可行性研究报告范文长沙seo服务哪个公司好
  • 东营网站建设公司 网络易搜索量用什么工具查询
  • 照明公司网站制作外链吧
  • 网站自己做服务器划算吗seo建设
  • 商务网站建设实验书重庆seo招聘
  • h5手机制作软件app有哪些二十个优化
  • 天津哪里能做网站百度点击工具
  • 镇江网站建设yubei021网络营销怎么做推广
  • 海淀做网站的公司广告素材
  • 阿里妈妈网站怎么做站长平台
  • 公众号开发获取司机实时轨迹免费的seo优化
  • 网站建设续费的回访话术seo网课培训