当前位置: 代码迷 >> 综合 >> 2.1.1.11在LCD上显示摄像头图像6_在PC(Ubuntu)上显示
  详细解决方案

2.1.1.11在LCD上显示摄像头图像6_在PC(Ubuntu)上显示

热度:63   发布时间:2023-10-16 01:09:38.0

 

 

应用程序以面向对象的思路来写,极大的增强了程序的可扩展性: 比如现在想在PC端显示摄像头的数据。之前负责在LCD上显示的文件是fb.c,现在只需要再构造一个crt.c即可。

 

参考之前的电子书源码crt.c:

#include <config.h>
#include <disp_manager.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/fb.h>
#include <string.h>
#include <vga.h>
#include <vgagl.h>
#include <stdlib.h>static GraphicsContext *physicalscreen;
static GraphicsContext *virtualscreen;static int CRTDeviceInit(void);
static int CRTShowPixel(int iX, int iY, unsigned int dwColor);
static int CRTCleanScreen(unsigned int dwBackColor);
static int CRTDeviceExit(void);
static int CRTShowPage(PT_PixelDatas ptPixelDatas);static T_DispOpr g_tCRTOpr = {.name        = "crt",.DeviceInit  = CRTDeviceInit,.DeviceExit  = CRTDeviceExit,.ShowPixel
  相关解决方案