1 Star 0 Fork 44

hardy_tu / VirtualLCD

forked from jiangxiaogang / VirtualLCD 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

VirtLCD

VirtLCD是一个通用的LCD模拟器,可以利用它在Windows系统的电脑上模拟嵌入式GUI开发。

工作原理

virtlcd.exe 是服务器程序,负责创建窗口,创建显存,并把显存的数据显示到屏幕上。

virtlcd.dll 是客户端动态链接库,用户程序调用它的接口,可以获取到显存地址,直接往该地址写数据就能显示到LCD屏幕上,同时它和服务器通过UDP通信,接收按键和鼠标消息。

使用独立进程来绘制屏幕的好处就是方便调试。用户程序在画点时打断点,服务器进程不受影响,可以实时输出显示内容。

API接口

//启动VirtLCD,设置分辨率,色深,放大倍数
BOOL VirtLCD_Init(int width, int height, int bpp, int scale);

//关闭VirtLCD
void VirtLCD_Exit(void);

//设置按键消息回调函数
void VirtLCD_SetKeybdProc(KEYBDPROC func);

//设置鼠标消息回调函数
void VirtLCD_SetMouseProc(MOUSEPROC func);

//获取LCD帧缓存
void *VirtLCD_GetFrameBuffer(void);

注意:API使用的调用约定是__cdecl,这个也是编译器的默认值。

示例程序

参考example目录下的代码,参考使用方法。

MIT License Copyright (c) 2022 jiangxiaogang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

虚拟LCD,可用于GUI移植,如ucGUI,emWin,MiniGUI,TouchGFX, LittleVGL等. 展开 收起
C++
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C++
1
https://gitee.com/hardy_tu/VirtualLCD.git
git@gitee.com:hardy_tu/VirtualLCD.git
hardy_tu
VirtualLCD
VirtualLCD
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891