-
Notifications
You must be signed in to change notification settings - Fork 11
/
README
208 lines (158 loc) · 7.6 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
Start with basic geometrics: test/egi_geometry.c
Start with Freetype text output: test/egi_HelloWorld.c
----- 1. Basic Concepts (obsolete! see EGI_SURFACE )-----
0. EBOX is the basic graphic element, and all other elements such as Buttons, Txtbox, Slider,
List ... are derived from and based on it.
Please see basic EBOX concept in egi.h/egi.c, see symbol concept in symbol.c/FTsymbol.c
Note: EBOX is a heavy element for button application, and it's not necessary for a simple
button/keypad application. See such an example in test_keypad.c.
1. The EGI mainly focus on EGI_IMGBUF/EGI_PCMBUF data processing and PAGE managing/displaying,
Always try to avoid processing other type data and handling other events, which shall be
taken on by specific APPs.
2. An APP will handle/process its own business data, and convert to EGI_IMGBUF/EGI_PCMBUF first
when it need to display image or playback sound.
3. or, The EGI prepare/set PAGE environment according to APP's request, then the APP
will use EGI interface to displaying any content by itself. ERING will be applied
as a way of IPC ---NOPE
4. An APP consists of two kinds of components: EGI_UI PAGEs, and executable APP files.
They will be forked and launched as child processes of homepage program.
By such a way that we can code and develop APPs independently, To install them, we only
need to inform homepage programe its icons and bin file location/address. It can also
run independently without the HOME PAGE.
Examples: wegi/app/ffmusic wegi/app/ebook
5. All child processes to be handled by ULOOP_PROCESSE? ---TBD
6. Since APP processes will be suspended and reactivated by signals(STOP/CONT), and data
transfering will be cut off and leg go abruptly by the signals. For example, LCD displays
with SPI transfering color data, sound card plays with I2S transfering pcm data.
Take care of those situations, so broken dataflow will not cause any disfunction.
7. Any loosely coupled and standing_by processes, such as weather info, IoT client interface,
media_player... etc, will be started from init scripts as a deamon and managed by Openwrt
PROCD therefore.
In such cases, ERING may be a way of IPC.
NOTE:
1. Difference between OpenWRT uClibc and Glibc may cause some trouble!?
2. In uClibc calling malloc(0) returns NULL, while Glibc returs a valid pointer? same
situation for realloc().
3. uClibc can run on MMU-less systems.
4. The homepage main process shall be as small as possible, most heavier codes and jobs
are to be carried out by the APP, so it will be fast enough to fork()/vfork() and execv() a
new APP.
5. For little_endian system only. ---NOW
6. For 32-bit processor/system only. ---NOW
7. For Arithmetic_Right/Left_Shifting only. ---NOW
----- 2. TODO List -----
TODO:
0. To distinguish some key words:
Draw,Display: Render image and display on screen
WriteFB: Wrtie data to FB buffer only.
1. Spport for multilayer frame buffer.
2. A module using UBUS as a mechanism to manage and communicate with external processes,
as such a way to substitue system() and popen() to launch and control process with no PAGE(unvisiable).
for system() and popen() also call fork() to launch a new process, and it's too slow!
3. A private memory allocation module. necessary???
4. A simple RPC based on UBUS for remote control and data transfer.
5. To improve touch_read() logic, from time_consuming polling to event_driven.
6. A List operation for PAGE switchover.
----- 3. Main Source Files ( GPL v2 ) -----
( --- 3.1 Basics --- )
egi.conf An example of EGI TOUCH config file
xtp2046.c touch controller interface funcs
egi.c concept ebox functions
egi_fbdev.c fb basic functions
egi_fbgeom.c fb basic geometry functions
egi_color.c color definition and conversion functions
egi_symbol.c fonts/icons/symbols...definition and functions
egi_FTsymbol.c FreeType2 fonts/strings handling/displaying functions
egi_FTcharmap.c FreeType2 based text displaying/editing functions.
egi_unihan.c Module for Unicode Han
egi_bjp.c funcs for processing bmp,jpg and png files
egi_gif.c funcs for GIF, derived from GIFLIB ( Gershon Elber <gershon[AT]cs.technion.sc.il> ).
egi_image.c EGI_IMGBUF functions
egi_timer.c timer and delay
egi_debug.c for debug
egi_log.c for logger operation
egi_math.c a common math function module
egi_iotclient.c A BIGIOT client application.
egi_ring.c a ERING mechanism ( for process communication between UI and APPs --- TDB )
egi_txt.c type_txt ebox functions
egi_btn.c type_btn ebox
egi_sbtn.c Simple type button.
egi_slider.c type_slier ebox, for sliding bar.
egi_list.c type_list ebox
egi_pic.c type_pic ebox
egi_procman.c subprocess handling and its signal actions.
egi_input.c read mouse and other input events
egi_touch.c For touch input
egi_gb2unicode.c NOW: GB2312/Unicode conversion.
egi_utils.c some helper functions
egi_fifo.c a common fifo module for EGI
egi_filo.c a common filo module for EGI
egi_cstring.c string helper
egi_shmem.c share memory helper functions
egi_https.c curl https API
egi_iwinfo.c wifi info. extraction
egi_inet.c TCP/UDP util module
egi_unet.c UNIX domain socket module for local IPC.
egi_surface.c EGI SURFACE module
egi_aes.c AES encryption module.
egi_ringbuffer.c A simple ring buffer module.
egi_matrix.c A matrix operation lib
sys_list.h List operation derived from Linux kernel codes.
sys_incbin.h Include binary files in your C/C++ applications with ease
Source: https://github.com/graphitemaster/incbin
/test
test_editor.c A simple editor.
/test/surf/ EGI SURFACEs
test_surfman.c A surface manager.
test_surfuser.c A surface user.
surfman_guider.c A guider for surface manager.
surf_alarm.c A surface user: an ALARMer.
surf_madplay.c A surface user: A madplayer.
surf_wifiscan.c A surface user: A WIFI scanner.
surf_tetris.c A surface user: A tetris game.
surf_.... Other surface users
/cpptest/ EGI E3D_Mesh
EGI 3D Mesh moudle and test files.
( --- 3.2 Derived EBOXs --- )
egi_objtxt.c type_txt objects creation functions
egi_objlist.c list objects
( --- 3.3 PAGEs --- )
egi_pagehome.c PAGE home
egi_pagemplay.c PAGE mplayer
egi_pageopenwrt.c PAGE openwrt info.
egi_pagetest.c PAGE test
egi_pageslide.c PAGE sliding bar test (obselete)
( --- 3.4 APP Engines --- )
egi_appstock.c a real time stock data display app.
he_weather.c API for www.heweather.com
juhe_news.c API for www.juhe.cn
( --- 3.5 APP Suites --- )
app_ffmusic A music player
app_ffmotion A video player
app_ebook An ebook
app_avenger A game
app_news A simple netnews viewer powered by www.juhe.cn
----- 4. Dependency -----
libubox,
libubus,
libpng, libjpeg,
libasound,
libjson-c,
libfreetype2 /* Option, or use EGI_SYMPAGE instead */
libffmpeg, /* Option, for FFMUSIC and FFMOTION */
libshine, /* Option, for fixed point MP3 enconding */
libcurl, /* Option, for HTTP and HTTPS */
... ...
----- 5. OTHERS -----
prototype.jpg A prototype with Widora_NEO
neo_lcd_wiring.png Wiring for Widora_NEO to TFT LCD with touch
spi_cs2.patch A patch to add two more SPI select pin ( dts to be modified accordingly ),
one is for LCD touch SPI selection.
With reference to: https://blog.csdn.net/liuchen_csdn/article/details/51248049
dts_spidev.jpg dts for additional SPI devices.
FB device Create a FB device according to https://www.widora.io/zh/ips
Midas Zhou
[email protected] ( YAHOO stops email service for mainland China since 2022-03-01 !? )
Don't forget why we start! ---Just for FUN!
知之者不如好之者,好之者不如乐之者.