没有合适的资源?快使用搜索试试~ 我知道了~
首页emWin 5.32英文版用户与参考指南
emWin 5.32英文版用户与参考指南
需积分: 50 3 下载量 124 浏览量
更新于2024-07-15
收藏 13.68MB PDF 举报
emWin 5.32 是由德国嵌入式系统公司 SEGGER Microcontroller GmbH & Co. KG 开发的一款图形用户界面 (GUI) 图形库,专注于嵌入式系统的用户界面设计和实现。这款产品在文档 UM03001 中被详细介绍,软件版本为 V5.32,发布日期为 2015 年 10 月 6 日。用户指南涵盖了如何使用 emWin 提供的功能,以创建交互式图形界面,适用于微控制器应用。
文档中强调了以下关键知识点:
1. **产品背景**:
- emWin 是由 SEGGER Microcontroller 的专业技术团队开发,专为嵌入式系统提供高效的图形用户界面解决方案。
2. **版本与更新**:
- 当前版本是 V5.32,意味着它可能包含了一系列功能改进、性能提升以及 bug 修复,用户应确保使用最新版本以获取最佳支持。
3. **免责声明**:
- 文档中的规格虽力求准确,但不保证完全无误,可能会因功能或性能优化而进行更新,且不承担任何责任,包括对错误或遗漏的责任。因此,在使用时务必确认最新版本。
4. **版权与许可**:
- 使用该手册的部分或修改 PDF 文件需事先获得 SEGGER 的书面许可,体现了严格的版权保护政策。
5. **适用范围**:
- emWin 5.32 适用于那些需要创建嵌入式设备图形用户界面的项目,可能涉及工业控制、消费电子、汽车电子等领域。
6. **技术特性**:
- emWin 提供的图形库包括丰富的图形元素、布局管理、事件处理等功能,有助于简化用户界面的设计和实现。
通过这份用户参考指南,开发者可以了解到如何利用 emWin 5.32 创建高效、定制化的嵌入式系统图形界面,同时理解其潜在限制和使用注意事项。这是一款适合专业嵌入式开发人员的工具,能显著提高开发效率并提升用户体验。

16
UM03001 User & Reference Guide for emWin V5.32 ©
1997 - 2015 SEGGER Microcontroller GmbH & Co. KG
EMBEDDED SOFTWARE
(Middleware)
emWin
Graphics software and GUI
emWin is designed to provide an effi-
cient, processor- and display control-
ler-independent graphical user
interface (GUI) for any application that
operates with a graphical display.
embOS
Real Time Operating System
embOS is an RTOS designed to offer
the benefits of a complete multitasking
system for hard real time applications
with minimal resources.
embOS/IP
TCP/IP stack
embOS/IP a high-performance TCP/IP
stack that has been optimized for
speed, versatility and a small memory
footprint.
emFile
File system
emFile is an embedded file system with
FAT12, FAT16 and FAT32 support. Vari-
ous Device drivers, e.g. for NAND and
NOR flashes, SD/MMC and Compact-
Flash cards, are available.
USB-Stack
USB device/host stack
A USB stack designed to work on any
embedded system with a USB control-
ler. Bulk communication and most stan-
dard device classes are supported.
SEGGER TOOLS
Flasher
Flash programmer
Flash Programming tool primarily for micro con-
trollers.
J-Link
JTAG emulator for ARM cores
USB driven JTAG interface for ARM cores.
J-Trace
JTAG emulator with trace
USB driven JTAG interface for ARM cores with
Trace memory. supporting the ARM ETM (Embed-
ded Trace Macrocell).
J-Link / J-Trace Related Software
Add-on software to be used with SEGGER’s indus-
try standard JTAG emulator, this includes flash
programming software and flash breakpoints.
SEGGER Microcontroller GmbH & Co. KG develops
and distributes software development tools and ANSI C
software components (middleware) for embedded sys-
tems in several industries such as telecom, medical
technology, consumer electronics, automotive industry
and industrial automation.
SEGGER’s intention is to cut software development time
for embedded applications by offering compact flexible and easy to use middleware,
allowing developers to concentrate on their application.
Our most popular products are emWin, a universal graphic software package for embed-
ded applications, and embOS, a small yet efficient real-time kernel. emWin, written
entirely in ANSI C, can easily be used on any CPU and most any display. It is comple-
mented by the available PC tools: Bitmap Converter, Font Converter, Simulator and
Viewer. embOS supports most 8/16/32-bit CPUs. Its small memory footprint makes it
suitable for single-chip applications.
Apart from its main focus on software tools, SEGGER develops and produces programming
tools for flash micro controllers, as well as J-Link, a JTAG emulator to assist in develop-
ment, debugging and production, which has rapidly become the industry standard for
debug access to ARM cores.
Corporate Office:
http://www. segger.com
United States Office:
http://www.segger-us.com

UM03001 User & Reference Guide for emWin V5.32 © 1997 - 2015 SEGGER Microcontroller GmbH & Co. KG
17
1 Introduction to emWin....................................................................................................35
1.1 Purpose of this document .........................................................................35
1.2 Requirements..........................................................................................35
1.2.1 Target system (hardware) ........................................................................35
1.2.2 Development environment (compiler).........................................................36
1.3 Features.................................................................................................36
1.4 Examples and demos ...............................................................................37
1.5 Starter kits .............................................................................................37
1.6 Screen and coordinates ............................................................................38
1.7 How to connect the display to the microcontroller ........................................38
1.8 Data types..............................................................................................39
2 Getting Started...............................................................................................................41
2.1 Recommended project structure ................................................................42
2.2 Subdirectories.........................................................................................42
2.2.1 Include directories ...................................................................................42
2.3 Adding emWin to the target program .........................................................43
2.4 Creating a library.....................................................................................43
2.4.1 Adapting the library batch files to a different system ....................................44
2.5 C files to include in the project ..................................................................46
2.6 Configuring emWin ..................................................................................47
2.7 Initializing emWin....................................................................................48
2.8 Using emWin with target hardware ............................................................49
2.9 The "Hello world" example program ...........................................................50
3 Simulation ......................................................................................................................51
3.1 Using the simulation ................................................................................52
3.1.1 Rotating and mirroring the screen..............................................................52
3.1.2 Using the simulation with the trial version of emWin.....................................52
3.1.2.1 Directory structure...................................................................................52
3.1.2.2 Visual C++ workspace..............................................................................53
3.1.2.3 Compiling the demo program ....................................................................53
3.1.2.4 Compiling the samples .............................................................................53
3.1.3 Using the simulation with the emWin source................................................54
3.1.3.1 Directory structure...................................................................................54
3.1.3.2 Visual C++ workspace..............................................................................55
3.1.3.3 Compiling the application..........................................................................55
3.1.4 Advanced features of the simulation...........................................................55
3.1.4.1 Pause and Resume ..................................................................................55
3.1.4.2 View system info .....................................................................................56
3.1.4.3 Copy to clipboard ....................................................................................56
3.2 Device simulation ....................................................................................57
3.2.1 Generated frame view..............................................................................58
3.2.2 Custom bitmap view ................................................................................58
3.2.3 Window view...........................................................................................59
3.3 Device simulation API...............................................................................60
3.4 Hardkey simulation..................................................................................66
3.4.1 Hardkey simulation API ............................................................................67
3.5 Integrating the emWin simulation into an existing simulation.........................70
3.5.1 Directory structure...................................................................................70
Table of Contents

18
UM03001 User & Reference Guide for emWin V5.32 © 1997 - 2015 SEGGER Microcontroller GmbH & Co. KG
3.5.2 Using the simulation library ...................................................................... 70
3.5.2.1 Modifying WinMain .................................................................................. 70
3.5.2.2 Example application................................................................................. 71
3.5.3 Integration into the embOS Simulation....................................................... 72
3.5.3.1 WinMain................................................................................................. 72
3.5.3.2 Target program (main) ............................................................................ 73
3.5.4 GUI simulation API .................................................................................. 74
4 Viewer............................................................................................................................77
4.1 Using the viewer ..................................................................................... 78
4.1.1 Using the simulation and the viewer .......................................................... 78
4.1.2 Using the viewer with virtual pages ........................................................... 79
4.1.3 Always on top......................................................................................... 79
4.1.4 Open further windows of the display output ................................................ 79
4.1.5 Zooming ................................................................................................ 80
4.1.6 Copy the output to the clipboard ............................................................... 80
4.1.7 Using the viewer with multiple displays ...................................................... 81
4.1.8 Using the viewer with multiple layers ......................................................... 81
5 emWinSPY.....................................................................................................................83
5.1 Introduction ........................................................................................... 84
5.1.1 Requirements ......................................................................................... 84
5.1.2 Availability ............................................................................................. 84
5.2 Starting the emWinSPY server... ............................................................... 84
5.2.1 ...in the simulation environment................................................................ 84
5.2.2 ...on the target hardware ......................................................................... 84
5.2.3 GUI_SPY_X_StartServer........................................................................... 85
5.3 The emWinSPY viewer ............................................................................. 85
5.3.1 The screen ............................................................................................. 85
5.3.1.1 Status area ............................................................................................ 85
5.3.1.2 History area ........................................................................................... 86
5.3.1.3 Windows area......................................................................................... 87
5.3.1.4 Input area.............................................................................................. 88
5.3.2 Connecting to target................................................................................ 88
5.3.3 Configuration options............................................................................... 89
5.3.4 Taking a screenshot from the target .......................................................... 90
5.4 emWinSPY API........................................................................................ 90
6 Displaying Text ..............................................................................................................93
6.1 Basic routines......................................................................................... 94
6.2 Drawing modes....................................................................................... 94
6.3 Position ................................................................................................. 95
6.4 Text API................................................................................................. 96
6.4.1 Displaying text........................................................................................ 97
6.4.2 Drawing modes......................................................................................104
6.4.3 Alignment .............................................................................................105
6.4.4 Position ................................................................................................106
7 Displaying Values ........................................................................................................107
7.1 Value API..............................................................................................108
7.1.1 Displaying decimal values........................................................................108
7.1.2 Displaying floating point values ................................................................112
7.1.3 Displaying binary values..........................................................................114
7.1.4 Displaying hexadecimal values.................................................................115
7.1.5 Version of emWin...................................................................................116
8 2-D Graphic Library......................................................................................................117
8.1 Graphic API ...........................................................................................118
8.1.1 Drawing related functions........................................................................121

UM03001 User & Reference Guide for emWin V5.32 © 1997 - 2015 SEGGER Microcontroller GmbH & Co. KG
19
8.1.2 Basic drawing routines ........................................................................... 124
8.1.3 Alpha blending ...................................................................................... 130
8.1.4 Drawing bitmaps ................................................................................... 133
8.1.5 Drawing streamed bitmaps ..................................................................... 135
8.1.6 Drawing lines ........................................................................................ 144
8.1.7 Drawing polygons .................................................................................. 148
8.1.8 Drawing circles...................................................................................... 152
8.1.9 Drawing ellipses .................................................................................... 153
8.1.10 Drawing arcs......................................................................................... 154
8.1.11 Drawing graphs..................................................................................... 155
8.1.12 Drawing pie charts................................................................................. 156
8.1.13 Saving and restoring the GUI-context....................................................... 157
8.1.14 Info about screen changes ...................................................................... 157
8.1.15 Avoiding tearing effects.......................................................................... 160
9 Displaying bitmap files .................................................................................................161
9.1 BMP file support .................................................................................... 162
9.1.1 Supported formats................................................................................. 162
9.1.2 BMP API ............................................................................................... 162
9.2 JPEG file support ................................................................................... 168
9.2.1 Supported JPEG compression methods ..................................................... 168
9.2.2 Converting a JPEG file to C source............................................................ 168
9.2.3 Displaying JPEG files .............................................................................. 168
9.2.4 Memory usage ...................................................................................... 169
9.2.5 Progressive JPEG files ............................................................................ 169
9.2.6 JPEG API .............................................................................................. 169
9.3 GIF file support ..................................................................................... 174
9.3.1 Converting a GIF file to C source ............................................................. 174
9.3.2 Displaying GIF files ................................................................................ 174
9.3.3 Memory usage ...................................................................................... 174
9.3.4 GIF API ................................................................................................ 174
9.4 PNG file support .................................................................................... 183
9.4.1 Converting a PNG file to C source ............................................................ 183
9.4.2 Displaying PNG files ............................................................................... 183
9.4.3 Memory usage ...................................................................................... 183
9.4.4 PNG API ............................................................................................... 183
9.5 Getting data with the ...Ex() functions...................................................... 187
10 Bitmap Converter.......................................................................................................189
10.1 What it does ......................................................................................... 190
10.2 Loading a bitmap................................................................................... 190
10.2.1 Supported input file formats.................................................................... 190
10.2.2 Loading from a file................................................................................. 190
10.2.3 Using the clipboard ................................................................................ 191
10.3 Color conversion.................................................................................... 191
10.4 Dithering.............................................................................................. 192
10.5 Using a custom palette........................................................................... 192
10.5.1 Saving a palette file ............................................................................... 193
10.5.2 Palette file format.................................................................................. 193
10.5.3 Palette files for fixed palette modes.......................................................... 193
10.5.4 Converting a bitmap .............................................................................. 193
10.6 Generating C files from bitmaps............................................................... 193
10.6.1 Supported bitmap formats ...................................................................... 194
10.6.2 Palette information ................................................................................ 194
10.6.3 Transparency ........................................................................................ 195
10.6.4 Alpha blending ...................................................................................... 195
10.6.5 Selecting the best format........................................................................ 196
10.6.6 Saving the file....................................................................................... 198
10.7 Generating C stream files ....................................................................... 199
10.8 Compressed bitmaps.............................................................................. 200

20
UM03001 User & Reference Guide for emWin V5.32 © 1997 - 2015 SEGGER Microcontroller GmbH & Co. KG
10.9 Creating animated sprites / cursors ..........................................................200
10.10 Command line usage ..............................................................................202
10.10.1 Format for commands.............................................................................202
10.10.2 Command line options ............................................................................203
10.11 Example of a converted bitmap ................................................................205
11 Fonts..........................................................................................................................207
11.1 Introduction ..........................................................................................208
11.2 Font types.............................................................................................208
11.3 Font formats..........................................................................................210
11.3.1 C file format ..........................................................................................210
11.3.2 System Independent Font (SIF) format .....................................................210
11.3.3 External Bitmap Font (XBF) format ...........................................................211
11.3.4 iType font engine support........................................................................212
11.3.5 TrueType Font (TTF) format.....................................................................213
11.4 Converting a TTF file to C source..............................................................214
11.5 Declaring custom fonts ...........................................................................214
11.6 Selecting a font......................................................................................214
11.7 Font API................................................................................................215
11.7.1 C file related font functions......................................................................216
11.7.2 ’SIF’ file related font functions..................................................................217
11.7.3 ’TTF’ file related font functions .................................................................218
11.7.4 ’XBF’ file related font functions.................................................................222
11.7.5 Common font-related functions ................................................................224
11.8 Character sets .......................................................................................228
11.8.1 ASCII ...................................................................................................228
11.8.2 ISO 8859-1 Western Latin character set....................................................228
11.8.3 Unicode ................................................................................................230
11.9 Standard fonts.......................................................................................230
11.9.1 Font identifier naming convention.............................................................230
11.9.2 Font file naming convention.....................................................................231
11.9.3 Measurement, ROM-size and character set of fonts .....................................231
11.9.4 Proportional fonts...................................................................................232
11.9.4.1 Overview ..............................................................................................232
11.9.4.2 Font details ...........................................................................................233
11.9.4.3 Characters ............................................................................................234
11.9.5 Proportional fonts, framed.......................................................................241
11.9.5.1 Overview ..............................................................................................241
11.9.5.2 Font details ...........................................................................................241
11.9.5.3 Characters ............................................................................................241
11.9.6 Monospaced fonts ..................................................................................242
11.9.6.1 Overview ..............................................................................................242
11.9.6.2 Font details ...........................................................................................242
11.9.6.3 Characters ............................................................................................243
11.9.7 Digit fonts (proportional).........................................................................248
11.9.7.1 Overview ..............................................................................................248
11.9.7.2 Font details ...........................................................................................248
11.9.7.3 Characters ............................................................................................248
11.9.8 Digit fonts (monospaced) ........................................................................250
11.9.8.1 Overview ..............................................................................................250
11.9.8.2 Font details ...........................................................................................250
11.9.8.3 Characters ............................................................................................250
12 Font Converter...........................................................................................................253
12.1 Requirements ........................................................................................254
12.2 Creating an emWin font file from a Windows font .......................................254
12.3 Font generation options dialog .................................................................256
12.3.1 Type of font to generate..........................................................................257
12.3.2 Encoding...............................................................................................257
12.3.3 Antialiasing ...........................................................................................257
剩余1292页未读,继续阅读
424 浏览量
376 浏览量
163 浏览量
315 浏览量
274 浏览量
128 浏览量
112 浏览量
153 浏览量

shanlinmingyue
- 粉丝: 0
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助

最新资源
- PlantUML代码生成器:跨语言类图转换工具
- 在线抠图Demo: H5与canvas技术实现网页端图片编辑
- 测试STM32F107结合uCOS+LwIP的TCP收发性能
- 第七届ITAT PCB设计决赛试题解析与分享
- 利用jQuery+css3打造动态平面圆形菜单效果
- 流体系统:打造响应式设计的新型样式转换器
- 深入学习JDO 2.2 API及其官方文档
- WTM库:WordPress主题管理器的TypeScript实现
- Transcend创见U盘JF620/V35修复工具v4.0.0.35发布
- 最新Farseer 3.3.1 2D物理引擎:游戏开发者的利器
- STenWin 汉字全字库XBF格式生成与SD卡存FLASH使用教程
- 免费下载:透明效果的两列js下拉菜单
- 台湾厂TFT LCD原理内部培训教程
- immediate微任务库:跨浏览器即时任务执行
- ADS引用机器人:通过邮件和Twitter更新您的学术论文引用
- Total PDF Converter v2.1.273中文版:专业多功能PDF文件转换工具
安全验证
文档复制为VIP权益,开通VIP直接复制
