C语言 用于微控制器的 GUI 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2997648/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GUI-Library for microcontroller
提问by Martin
I want to create a GUI driven application for a micro-controller (Atmel XMEGA) that is connected to a 128x64 dots graphics LCD (EA DOGL128-6) and 4 buttons for navigation.
我想为连接到 128x64 点图形 LCD ( EA DOGL128-6) 和 4 个导航按钮的微控制器 ( Atmel XMEGA)创建一个 GUI 驱动的应用程序。
Controlling the display itself (e.g. drawing pixels and characters) is noproblem but in order to prevent me from reinventing the wheel I was googling for a GUI-Library/-Toolkit that is written in c, includes its source code, will run on a 32 MHz 8-bit micro-controller and provides at least the following controls:
控制显示本身(例如绘制像素和字符)没有问题,但为了防止我重新发明轮子,我在谷歌上搜索了一个用 c 编写的 GUI-Library/-Toolkit,包括它的源代码,将在一个32 MHz 8 位微控制器,至少提供以下控制:
- panel (to group elements)
- menu (scrollable)
- icon
- label
- button
- line-graph (optional)
- 面板(对元素进行分组)
- 菜单(可滚动)
- 图标
- 标签
- 按钮
- 折线图(可选)
But I didn't find any thing useful. Does anyone know (or better uses) such a library(preferably for free)?
但我没有发现任何有用的东西。有谁知道(或更好地使用)这样的图书馆(最好是免费的)?
采纳答案by Judge Maygarden
I would consider rolling your own "immediate mode" GUI. Jari Komppahas a good tutorialabout them. It's a lot easier than you may think, and you'll probably find most GUI libraries--even those targeting embedded systems--are a bit heavy-weight for your system.
我会考虑滚动你自己的“立即模式”GUI。Jari Komppa有一个关于它们的很好的教程。它比您想象的要容易得多,而且您可能会发现大多数 GUI 库——甚至那些针对嵌入式系统的库——对您的系统来说都有些沉重。
If you insist on using a third-party library, below are a few I found. I've never used any of them and they are probably fairly expensive.
如果你坚持使用第三方库,下面是我发现的一些。我从来没有用过它们中的任何一个,它们可能相当昂贵。
回答by INS
回答by Oskar N.
You should take a look at Contiki[wikipedia.org]
你应该看看Contiki[wikipedia.org]
Besides being a small and elegant operating system for many 8/16/32-bit microcontrollers, it also features a GUI toolkit. It runs on the Atmel AVR!
除了是适用于许多 8/16/32 位微控制器的小巧优雅的操作系统外,它还具有 GUI 工具包。它在 Atmel AVR 上运行!
For your convenience, here is a direct link to the The Contiki Toolkit (CTK) source code.
为方便起见,这里是Contiki Toolkit (CTK) 源代码的直接链接。
回答by Achim D?bler
I also wrote a library which supports nearly any display technology: μGUI
我还编写了一个支持几乎所有显示技术的库: μGUI
http://www.embeddedlightning.com/ugui/
http://www.embeddedlightning.com/ugui/
μGUIis a free and open source graphic library for embedded systems. It is platform-independent and can be easily ported to almost every micro-controller system. As long as the display is capable of showing graphics, μGUIis not restricted to a certain display technology. Therefore display technologies such as LCD, TFT, E-Paper, LEDor OLEDare supported. The whole module consists of two files: ugui.cand ugui.h.
μGUI是一个用于嵌入式系统的免费开源图形库。它独立于平台,可以轻松移植到几乎所有微控制器系统。只要显示器能够显示图形,μGUI就不受某种显示技术的限制。因此,支持LCD、TFT、E-Paper、LED或等显示技术OLED。整个模块由两个文件组成:ugui.c和ugui.h.
This might be helpful as well
这也可能有帮助
回答by Timmmm
Atmel (now owned by Microchip) actually makes a GUI library targeted at their microcontrollers.
Atmel(现在归 Microchip 所有)实际上制作了一个针对其微控制器的 GUI 库。
This is part of the now called Microchip? Advanced Software Framework.
这是现在叫Microchip的一部分?高级软件框架。
回答by mike redmont
Rich Quinnell mentions "... I saw a demonstration of Java applications running on an STM32-F3 MCU..." http://www.microcontrollercentral.com/author.asp?section_id=1741&doc_id=253618
Rich Quinnell 提到“......我看到了在 STM32-F3 MCU 上运行的 Java 应用程序的演示......” http://www.microcontrollercentral.com/author.asp?section_id=1741&doc_id=253618
I guess it is what you are looking for?
我想这就是你要找的吗?
回答by Clifford
In addition to Judge Maygarden's list RAMTEXprovide libraries specifically aimed at small graphic LCDs. Again not free, but is this is for commercial use, remember that if you did it yourself, it may take many man hours to achieve a polished product, so consider that before building your own.
除了 Maygarden 法官的列表之外,RAMTEX 还提供专门针对小型图形 LCD 的库。再次不是免费的,但这是用于商业用途的,请记住,如果您自己制作,可能需要花费很多工时才能获得精美的产品,因此在构建您自己的产品之前请考虑这一点。
At the rates my company accounts for my time (as opposed to my pay rate), if it took more than five hours, I'd be better off buying the Ramtex library (about two days if you only take my pay rate into account). If however you have the time and inclination, it is not a difficult task, and probably fun.
以我公司占我时间的费率(与我的工资率相反),如果超过五个小时,我最好购买 Ramtex 库(如果只考虑我的工资率,大约两天) . 但是,如果您有时间和兴趣,这不是一项艰巨的任务,而且可能很有趣。
回答by Jay Atkinson
回答by peter_mcc
We've started using easyGui and it seems good. You design the screens in a PC app then it generates the source code - making the design stage really easy.
我们已经开始使用easyGui,它看起来不错。您在 PC 应用程序中设计屏幕,然后它会生成源代码 - 使设计阶段变得非常简单。
It does most of the things on the list. Line graphs are coming soon. You can make up buttons pretty easily as reusable structures.
它完成了清单上的大部分事情。折线图即将推出。你可以很容易地将按钮作为可重复使用的结构。
It comes with template drivers for lots of displays - depending on how closely the template matches your display (colour depth & interface are the biggest issues) you might be able to use the code unmodified or change it to suit.
它带有用于许多显示器的模板驱动程序 - 根据模板与您的显示器的匹配程度(颜色深度和界面是最大的问题),您可以使用未经修改的代码或对其进行更改以适应。
回答by radix07
I have been working on a similar project. Closest thing I could find are in the following links, but I doubt you will find a library with all the features you desire. These will only setup basic drawing functions, but it's a start. There are also some useful tools for bitmap converting and font creators if you dig around.
我一直在做一个类似的项目。我能找到的最接近的东西在以下链接中,但我怀疑您会找到一个具有您想要的所有功能的库。这些只会设置基本的绘图功能,但这是一个开始。如果您仔细研究,还有一些用于位图转换和字体创建器的有用工具。
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/glcd_dcf77/index.html
http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/glcd_dcf77/index.html
Almost everything else I have seen here is way overkill for what the poster seems to be asking for.
我在这里看到的几乎所有其他东西对于海报似乎要求的东西都太过分了。

