image/svg+xml
Brteve's API for EveApps
Version 0.0.1
The reference document for common folder of EveApps project.
 
Loading...
Searching...
No Matches
EVE_GpuDefs.h
Go to the documentation of this file.
1
38#ifndef EVE_GPU_DEFS__H
39#define EVE_GPU_DEFS__H
40
41#ifndef ESD_ENUM
42#define ESD_ENUM(name, ...)
43#define ESD_END()
44#endif
45
46#if !defined(EVE_MULTI_GRAPHICS_TARGET) \
47 && !defined(FT_80X_ENABLE) \
48 && !defined(FT_81X_ENABLE) \
49 && !defined(BT_88X_ENABLE) \
50 && !defined(BT_81X_ENABLE) \
51 && !defined(BT_81XA_ENABLE)
52#define EVE_MULTI_GRAPHICS_TARGET
53#endif
54
55/* Definitions used for FT800 coprocessor command buffer */
56#define EVE_DL_SIZE (8 * 1024UL)
57#define EVE_DL_COUNT (2 * 1024UL)
58#define EVE_CMD_FIFO_SIZE ((4) * 1024UL)
59#define EVE_CMD_FIFO_COUNT (1024UL)
60#define EVE_CMD_FIFO_MASK (EVE_CMD_FIFO_SIZE - 1)
61#define EVE_CMD_FIFO_ALIGNMENT_MASK (EVE_CMD_FIFO_SIZE - ((4) - 1))
62
63#define EVE_CMD_FAULT(rp) (rp & 0x3)
64
65#define EVE_FLASH_WRITE_ALIGN (256)
66#define EVE_FLASH_UPDATE_ALIGN (4096)
67#define EVE_FLASH_READ_ALIGN (64)
68#define EVE_FLASH_FIRMWARE_SIZE (4096)
69
70/**************
71** Addresses **
72**************/
73
76
77#define RAM_G 0UL
78#define ROM_CHIPID 786432UL
79#define RAM_ERR_REPORT 0x309800UL
80
81#if defined(EVE_MULTI_GRAPHICS_TARGET)
82
83#define EVE_HAL_REG_ID (phost->GpuDefs->RegId)
84#define EVE_HAL_REG_CPURESET (phost->GpuDefs->RegCpuReset)
85#define EVE_HAL_REG_J1_INT (phost->GpuDefs->RegJ1Int)
86#define EVE_HAL_REG_CMD_READ (phost->GpuDefs->RegCmdRead)
87#define EVE_HAL_REG_TOUCH_TRANSFORM_A (phost->GpuDefs->RegTouchTransformA)
88#define EVE_HAL_REG_CRC (phost->GpuDefs->RegCrc)
89#define EVE_HAL_REG_TRIM (phost->GpuDefs->RegTrim)
90#define EVE_HAL_REG_TOUCH_DIRECT_XY (phost->GpuDefs->RegTouchDirectXY)
91#define EVE_HAL_REG_DATESTAMP (phost->GpuDefs->RegDatestamp)
92#define EVE_HAL_REG_CMDB_SPACE (phost->GpuDefs->RegCmdBSpace)
93#define EVE_HAL_REG_TRACKER (phost->GpuDefs->RegTracker)
94
95#define RAM_DL (phost->GpuDefs->RamDl)
96#define ROMFONT_TABLEADDRESS (phost->GpuDefs->RomFontTableAddress)
97
98#define RAM_G_SIZE (phost->GpuDefs->RamGSize)
99#define LOW_FREQ_BOUND (phost->GpuDefs->LowFreqBound)
100
101#define BITMAP_ADDR_MASK (phost->GpuDefs->BitmapAddrMask)
102#define SCISSOR_XY_SHIFT (phost->GpuDefs->ScissorSizeShift - 1)
103#define SCISSOR_XY_MASK (((1UL << phost->GpuDefs->ScissorSizeShift) - 1UL) >> 1)
104#define SCISSOR_SIZE_SHIFT (phost->GpuDefs->ScissorSizeShift)
105#define SCISSOR_SIZE_MASK ((1UL << phost->GpuDefs->ScissorSizeShift) - 1UL)
106
107#else
108
109#if defined(FT_81X_ENABLE) || defined(BT_81X_ENABLE) || defined(BT_81XA_ENABLE)
110
111#define RAM_G_SIZE (1024 * 1024L)
112
113#elif defined(FT_80X_ENABLE) || defined(BT_88X_ENABLE)
114
115#define RAM_G_SIZE (256 * 1024L)
116
117#endif
118
119#if defined(FT_81X_ENABLE) || defined(BT_88X_ENABLE) || defined(BT_81X_ENABLE) || defined(BT_81XA_ENABLE)
120
121#define EVE_HAL_REG_ID 3153920UL
122#define EVE_HAL_REG_CPURESET 3153952UL
123#define EVE_HAL_REG_J1_INT 3154084UL
124#define EVE_HAL_REG_CMD_READ 3154168UL
125#define EVE_HAL_REG_TOUCH_TRANSFORM_A 3154256UL
126#define EVE_HAL_REG_CRC 3154296UL
127#define EVE_HAL_REG_TRIM 3154304UL
128#define EVE_HAL_REG_TOUCH_DIRECT_XY 3154316UL
129#define EVE_HAL_REG_DATESTAMP 3155300UL
130#define EVE_HAL_REG_CMDB_SPACE 3155316UL
131#define EVE_HAL_REG_TRACKER 3182592UL
132
133#define RAM_DL 3145728UL
134#define ROMFONT_TABLEADDRESS 3145724UL
135
136#define LOW_FREQ_BOUND 58800000L //98% of 60Mhz
137
138#define SCISSOR_XY_SHIFT 11
139#define SCISSOR_XY_MASK 2047UL
140#define SCISSOR_SIZE_SHIFT 12
141#define SCISSOR_SIZE_MASK 4095UL
142
143#endif
144
145#if defined(BT_81X_ENABLE) || defined(BT_81XA_ENABLE)
146
147#define BITMAP_ADDR_MASK 16777215UL
148
149#elif defined(FT_81X_ENABLE) || defined(BT_88X_ENABLE)
150
151#define BITMAP_ADDR_MASK 4194303UL
152
153#elif defined(FT_80X_ENABLE)
154
155#define EVE_HAL_REG_ID 1057792UL
156#define EVE_HAL_REG_CPURESET 1057820UL
157#define EVE_HAL_REG_J1_INT 1057940UL
158#define EVE_HAL_REG_CMD_READ 1058020UL
159#define EVE_HAL_REG_TOUCH_TRANSFORM_A 1058076UL
160#define EVE_HAL_REG_CRC 1058152UL
161#define EVE_HAL_REG_TRIM 1058156UL
162#define EVE_HAL_REG_TOUCH_DIRECT_XY 1058164UL
163#define EVE_HAL_REG_DATESTAMP 1058108UL
164#define EVE_HAL_REG_CMDB_SPACE 0
165#define EVE_HAL_REG_TRACKER 1085440UL
166
167#define RAM_DL 1048576UL
168#define ROMFONT_TABLEADDRESS 1048572UL
169
170#define LOW_FREQ_BOUND 47040000L
172#define BITMAP_ADDR_MASK 1048575UL
173#define SCISSOR_XY_SHIFT 9
174#define SCISSOR_XY_MASK 511UL
175#define SCISSOR_SIZE_SHIFT 10
176#define SCISSOR_SIZE_MASK 1023UL
177
178#endif
179
180#endif
181
182#define RAM_PAL (RAM_DL + 8192UL)
183#define RAM_TOP (RAM_DL + 16384UL)
184#define RAM_CMD (RAM_DL + 32768UL)
185#define RAM_J1RAM (RAM_DL + 36864UL)
186#define RAM_ROMSUB (RAM_DL + 40960UL)
187#define RAM_JTBOOT (RAM_DL + 45056UL)
188#define RAM_BIST (RAM_DL + 524288UL)
189#define RAM_COMPOSITE (RAM_DL + 794624UL)
190
191#define RAM_REG (EVE_HAL_REG_ID + 0UL)
192#define REG_ID (EVE_HAL_REG_ID + 0UL)
193#define REG_FRAMES (REG_ID + 4UL)
194#define REG_CLOCK (REG_ID + 8UL)
195#define REG_FREQUENCY (REG_ID + 12UL)
196#define REG_RENDERMODE (REG_ID + 16UL)
197#define REG_SNAPY (REG_ID + 20UL)
198#define REG_SNAPSHOT (REG_ID + 24UL)
199#define REG_SNAPFORMAT (REG_ID + 28UL)
200
201#define REG_CPURESET (EVE_HAL_REG_CPURESET + 0UL)
202#define REG_TAP_CRC (REG_CPURESET + 4UL)
203#define REG_TAP_MASK (REG_CPURESET + 8UL)
204#define REG_HCYCLE (REG_CPURESET + 12UL)
205#define REG_HOFFSET (REG_CPURESET + 16UL)
206#define REG_HSIZE (REG_CPURESET + 20UL)
207#define REG_HSYNC0 (REG_CPURESET + 24UL)
208#define REG_HSYNC1 (REG_CPURESET + 28UL)
209#define REG_VCYCLE (REG_CPURESET + 32UL)
210#define REG_VOFFSET (REG_CPURESET + 36UL)
211#define REG_VSIZE (REG_CPURESET + 40UL)
212#define REG_VSYNC0 (REG_CPURESET + 44UL)
213#define REG_VSYNC1 (REG_CPURESET + 48UL)
214#define REG_DLSWAP (REG_CPURESET + 52UL)
215#define REG_ROTATE (REG_CPURESET + 56UL)
216#define REG_OUTBITS (REG_CPURESET + 60UL)
217#define REG_DITHER (REG_CPURESET + 64UL)
218#define REG_SWIZZLE (REG_CPURESET + 68UL)
219#define REG_CSPREAD (REG_CPURESET + 72UL)
220#define REG_PCLK_POL (REG_CPURESET + 76UL)
221#define REG_PCLK (REG_CPURESET + 80UL)
222#define REG_TAG_X (REG_CPURESET + 84UL)
223#define REG_TAG_Y (REG_CPURESET + 88UL)
224#define REG_TAG (REG_CPURESET + 92UL)
225#define REG_VOL_PB (REG_CPURESET + 96UL)
226#define REG_VOL_SOUND (REG_CPURESET + 100UL)
227#define REG_SOUND (REG_CPURESET + 104UL)
228#define REG_PLAY (REG_CPURESET + 108UL)
229#define REG_GPIO_DIR (REG_CPURESET + 112UL)
230#define REG_GPIO (REG_CPURESET + 116UL)
231#define REG_GPIOX_DIR (REG_CPURESET + 120UL)
232#define REG_GPIOX (REG_CPURESET + 124UL)
233#define REG_J1_COLD (REG_CPURESET + 128UL)
234
235#define REG_J1_INT (EVE_HAL_REG_J1_INT + 0UL)
236#define REG_INT_FLAGS (REG_J1_INT + 4UL)
237#define REG_INT_EN (REG_J1_INT + 8UL)
238#define REG_INT_MASK (REG_J1_INT + 12UL)
239#define REG_PLAYBACK_START (REG_J1_INT + 16UL)
240#define REG_PLAYBACK_LENGTH (REG_J1_INT + 20UL)
241#define REG_PLAYBACK_READPTR (REG_J1_INT + 24UL)
242#define REG_PLAYBACK_FREQ (REG_J1_INT + 28UL)
243#define REG_PLAYBACK_FORMAT (REG_J1_INT + 32UL)
244#define REG_PLAYBACK_LOOP (REG_J1_INT + 36UL)
245#define REG_PLAYBACK_PLAY (REG_J1_INT + 40UL)
246#define REG_PWM_HZ (REG_J1_INT + 44UL)
247#define REG_PWM_DUTY (REG_J1_INT + 48UL)
248#define REG_MACRO_0 (REG_J1_INT + 52UL)
249#define REG_MACRO_1 (REG_J1_INT + 56UL)
250#define REG_CYA0 (REG_J1_INT + 60UL)
251#define REG_CYA1 (REG_J1_INT + 64UL)
252#define REG_BUSYBITS (REG_J1_INT + 68UL)
253#define REG_ROMSUB_SEL (REG_J1_INT + 76UL)
254#define REG_RAM_FOLD (REG_J1_INT + 80UL)
255
256#define REG_CMD_READ (EVE_HAL_REG_CMD_READ + 0UL)
257#define REG_CMD_WRITE (REG_CMD_READ + 4UL)
258#define REG_CMD_DL (REG_CMD_READ + 8UL)
259#define REG_TOUCH_MODE (REG_CMD_READ + 12UL)
260#define REG_CTOUCH_EXTENDED (REG_CMD_READ + 16UL)
261#define REG_TOUCH_ADC_MODE (REG_CMD_READ + 16UL)
262#define REG_EHOST_TOUCH_X (REG_CMD_READ + 20UL)
263#define REG_TOUCH_CHARGE (REG_CMD_READ + 20UL)
264#define REG_TOUCH_SETTLE (REG_CMD_READ + 24UL)
265#define REG_EHOST_TOUCH_ID (REG_CMD_READ + 28UL)
266#define REG_TOUCH_OVERSAMPLE (REG_CMD_READ + 28UL)
267#define REG_EHOST_TOUCH_Y (REG_CMD_READ + 32UL)
268#define REG_TOUCH_RZTHRESH (REG_CMD_READ + 32UL)
269#define REG_CTOUCH_TOUCH1_XY (REG_CMD_READ + 36UL)
270#define REG_TOUCH_RAW_XY (REG_CMD_READ + 36UL)
271#define REG_CTOUCH_IDS (REG_CMD_READ + 40UL)
272#define REG_CTOUCH_TOUCH4_Y (REG_CMD_READ + 40UL)
273#define REG_TOUCH_RZ (REG_CMD_READ + 40UL)
274#define REG_CTOUCH_TOUCH0_XY (REG_CMD_READ + 44UL)
275#define REG_TOUCH_SCREEN_XY (REG_CMD_READ + 44UL)
276#define REG_TOUCH_TAG_XY (REG_CMD_READ + 48UL)
277#define REG_TOUCH_TAG (REG_CMD_READ + 52UL)
278#define REG_TOUCH_TAG1_XY (REG_CMD_READ + 56UL)
279#define REG_TOUCH_TAG1 (REG_CMD_READ + 60UL)
280#define REG_TOUCH_TAG2_XY (REG_CMD_READ + 64UL)
281#define REG_TOUCH_TAG2 (REG_CMD_READ + 68UL)
282#define REG_TOUCH_TAG3_XY (REG_CMD_READ + 72UL)
283#define REG_TOUCH_TAG3 (REG_CMD_READ + 76UL)
284#define REG_TOUCH_TAG4_XY (REG_CMD_READ + 80UL)
285#define REG_TOUCH_TAG4 (REG_CMD_READ + 84UL)
286
287#define REG_TOUCH_TRANSFORM_A (EVE_HAL_REG_TOUCH_TRANSFORM_A + 0UL)
288#define REG_TOUCH_TRANSFORM_B (REG_TOUCH_TRANSFORM_A + 4UL)
289#define REG_TOUCH_TRANSFORM_C (REG_TOUCH_TRANSFORM_A + 8UL)
290#define REG_TOUCH_TRANSFORM_D (REG_TOUCH_TRANSFORM_A + 12UL)
291#define REG_TOUCH_TRANSFORM_E (REG_TOUCH_TRANSFORM_A + 16UL)
292#define REG_TOUCH_TRANSFORM_F (REG_TOUCH_TRANSFORM_A + 20UL)
293#define REG_TOUCH_CONFIG (REG_TOUCH_TRANSFORM_A + 24UL)
294#define REG_ANALOG (REG_TOUCH_TRANSFORM_A + 28UL)
295#define REG_CTOUCH_GESTURE (REG_TOUCH_TRANSFORM_A + 28UL)
296#define REG_CTOUCH_TOUCH4_X (REG_TOUCH_TRANSFORM_A + 28UL)
297#define REG_PATCHED_TOUCH_FAULT (REG_TOUCH_TRANSFORM_A + 28UL)
298#define REG_EHOST_TOUCH_ACK (REG_TOUCH_TRANSFORM_A + 32UL)
299#define REG_PATCHED_ANALOG (REG_TOUCH_TRANSFORM_A + 32UL)
300#define REG_TOUCH_FAULT (REG_TOUCH_TRANSFORM_A + 32UL)
301#define REG_BIST_EN (REG_TOUCH_TRANSFORM_A + 36UL)
302
303#define REG_CRC (EVE_HAL_REG_CRC + 0UL)
304#define REG_SPI_EARLY_TX (REG_CRC + 4UL)
305
306#define REG_TRIM (EVE_HAL_REG_TRIM + 0UL)
307#define REG_ANA_COMP (REG_TRIM + 4UL)
308#define REG_SPI_WIDTH (REG_TRIM + 8UL)
309
310#define REG_CTOUCH_TOUCH2_XY (EVE_HAL_REG_TOUCH_DIRECT_XY + 0UL)
311#define REG_TOUCH_DIRECT_XY (REG_CTOUCH_TOUCH2_XY + 0UL)
312#define REG_CTOUCH_TOUCH3_XY (REG_CTOUCH_TOUCH2_XY + 4UL)
313#define REG_TOUCH_DIRECT_Z1Z2 (REG_CTOUCH_TOUCH2_XY + 4UL)
314#define REG_EJPG_READY (REG_CTOUCH_TOUCH2_XY + 8UL)
315#define REG_EJPG_BUSY (REG_CTOUCH_TOUCH2_XY + 12UL)
316#define REG_EJPG_DAT (REG_CTOUCH_TOUCH2_XY + 16UL)
317#define REG_EJPG_OPTIONS (REG_CTOUCH_TOUCH2_XY + 20UL)
318#define REG_EJPG_DST (REG_CTOUCH_TOUCH2_XY + 24UL)
319#define REG_EJPG_W (REG_CTOUCH_TOUCH2_XY + 28UL)
320#define REG_EJPG_H (REG_CTOUCH_TOUCH2_XY + 32UL)
321#define REG_EJPG_FORMAT (REG_CTOUCH_TOUCH2_XY + 36UL)
322#define REG_EJPG_RI (REG_CTOUCH_TOUCH2_XY + 40UL)
323#define REG_EJPG_TQ (REG_CTOUCH_TOUCH2_XY + 44UL)
324#define REG_EJPG_TDA (REG_CTOUCH_TOUCH2_XY + 48UL)
325#define REG_EJPG_Q (REG_CTOUCH_TOUCH2_XY + 52UL)
326#define REG_EJPG_HT (REG_CTOUCH_TOUCH2_XY + 180UL)
327#define REG_EJPG_DCC (REG_CTOUCH_TOUCH2_XY + 436UL)
328#define REG_EJPG_ACC (REG_CTOUCH_TOUCH2_XY + 460UL)
329#define REG_EJPG_SCALE (REG_CTOUCH_TOUCH2_XY + 972UL)
330#define REG_EJPG_DEBUG (REG_CTOUCH_TOUCH2_XY + 976UL)
331#define REG_RASTERY (REG_CTOUCH_TOUCH2_XY + 980UL)
332
333#define REG_DATESTAMP (EVE_HAL_REG_DATESTAMP + 0UL)
334
335#define REG_CMDB_SPACE (EVE_HAL_REG_CMDB_SPACE + 0UL)
336#define REG_CMDB_WRITE (REG_CMDB_SPACE + 4UL)
337#define REG_ADAPTIVE_FRAMERATE (REG_CMDB_SPACE + 8UL)
338#define REG_SPIM_DIR (REG_CMDB_SPACE + 12UL)
339#define REG_SPIM (REG_CMDB_SPACE + 16UL)
340#define REG_ESPIM_READSTART (REG_CMDB_SPACE + 20UL)
341#define REG_ESPIM_SEQ (REG_CMDB_SPACE + 24UL)
342#define REG_ESPIM_ADD (REG_CMDB_SPACE + 40UL)
343#define REG_ESPIM_COUNT (REG_CMDB_SPACE + 44UL)
344#define REG_ESPIM_WINDOW (REG_CMDB_SPACE + 48UL)
345#define REG_ESPIM_DUMMY (REG_CMDB_SPACE + 112UL)
346#define REG_ESPIM_TRIG (REG_CMDB_SPACE + 116UL)
347#define REG_PLAYBACK_PAUSE (REG_CMDB_SPACE + 120UL)
348#define REG_FLASH_STATUS (REG_CMDB_SPACE + 124UL)
349#define REG_FULLBUSYBITS (REG_CMDB_SPACE + 128UL)
350#define REG_SHA1KEY (REG_CMDB_SPACE + 144UL)
351
352#if defined(BT_81XA_ENABLE) || defined(EVE_MULTI_GRAPHICS_TARGET)
353#define REG_UNDERRUN (REG_CMDB_SPACE + 152UL)
354#define REG_AH_HCYCLE_MAX (REG_CMDB_SPACE + 156UL)
355#define REG_PCLK_FREQ (REG_CMDB_SPACE + 160UL)
356#define REG_PCLK_2X (REG_CMDB_SPACE + 164UL)
357#define REG_FLASH_DTR (REG_CMDB_SPACE + 168UL)
358#define REG_ESPIM_DTR (REG_CMDB_SPACE + 172UL)
359#define REG_HSF_HSIZE (REG_CMDB_SPACE + 176UL)
360#define REG_HSF_FT1 (REG_CMDB_SPACE + 180UL)
361#define REG_HSF_FSCALE (REG_CMDB_SPACE + 184UL)
362#define REG_HSF_F00 (REG_CMDB_SPACE + 188UL)
363#define REG_HSF_F02 (REG_CMDB_SPACE + 192UL)
364#define REG_HSF_F03 (REG_CMDB_SPACE + 196UL)
365#define REG_HSF_F10 (REG_CMDB_SPACE + 200UL)
366#define REG_HSF_F11 (REG_CMDB_SPACE + 204UL)
367#define REG_HSF_F12 (REG_CMDB_SPACE + 208UL)
368#define REG_HSF_F13 (REG_CMDB_SPACE + 212UL)
369#endif
370
371#define REG_TRACKER (EVE_HAL_REG_TRACKER + 0UL)
372#define REG_TRACKER_1 (REG_TRACKER + 4UL)
373#define REG_TRACKER_2 (REG_TRACKER + 8UL)
374#define REG_TRACKER_3 (REG_TRACKER + 12UL)
375#define REG_TRACKER_4 (REG_TRACKER + 16UL)
376#define REG_MEDIAFIFO_READ (REG_TRACKER + 20UL)
377#define REG_MEDIAFIFO_WRITE (REG_TRACKER + 24UL)
378#define REG_MEDIAFIFO_BASE (REG_TRACKER + 28UL)
379#define REG_MEDIAFIFO_SIZE (REG_TRACKER + 32UL)
380#define REG_FLASH_SIZE (REG_TRACKER + 36UL)
381#define REG_ANIM_ACTIVE (REG_TRACKER + 44UL)
382#define REG_DF_TUNED (REG_TRACKER + 48UL)
383#define REG_PLAY_CONTROL (REG_TRACKER + 334UL)
384
385#define REG_CTOUCH_TOUCHA_XY REG_CTOUCH_TOUCH1_XY
386#define REG_CTOUCH_TOUCHB_XY REG_CTOUCH_TOUCH2_XY
387#define REG_CTOUCH_TOUCHC_XY REG_CTOUCH_TOUCH3_XY
388#define REG_CTOUCH_TOUCHD_X REG_CTOUCH_TOUCH4_X
389#define REG_CTOUCH_TOUCHD_Y REG_CTOUCH_TOUCH4_Y
390
391#define EVE_GPUDEFS_IMPLEMENT REG_ID, \
392 REG_CPURESET, \
393 REG_J1_INT, \
394 REG_CMD_READ, \
395 REG_TOUCH_TRANSFORM_A, \
396 REG_CRC, \
397 REG_TRIM, \
398 REG_TOUCH_DIRECT_XY, \
399 REG_DATESTAMP, \
400 REG_CMDB_SPACE, \
401 REG_TRACKER, \
402 RAM_DL, \
403 ROMFONT_TABLEADDRESS, \
404 RAM_G_SIZE, \
405 LOW_FREQ_BOUND, \
406 BITMAP_ADDR_MASK, \
407 SCISSOR_SIZE_SHIFT
409
410/*************
411** Commands **
412*************/
413
414// clang-format off
415
418#define CMD_DLSTART 4294967040UL
419#define CMD_SWAP 4294967041UL
420#define CMD_INTERRUPT 4294967042UL
421#define CMD_BGCOLOR 4294967049UL
422#define CMD_FGCOLOR 4294967050UL
423#define CMD_GRADIENT 4294967051UL
424#define CMD_TEXT 4294967052UL
425#define CMD_BUTTON 4294967053UL
426#define CMD_KEYS 4294967054UL
427#define CMD_PROGRESS 4294967055UL
428#define CMD_SLIDER 4294967056UL
429#define CMD_SCROLLBAR 4294967057UL
430#define CMD_TOGGLE 4294967058UL
431#define CMD_GAUGE 4294967059UL
432#define CMD_CLOCK 4294967060UL
433#define CMD_CALIBRATE 4294967061UL
434#define CMD_SPINNER 4294967062UL
435#define CMD_STOP 4294967063UL
436#define CMD_MEMCRC 4294967064UL
437#define CMD_REGREAD 4294967065UL
438#define CMD_MEMWRITE 4294967066UL
439#define CMD_MEMSET 4294967067UL
440#define CMD_MEMZERO 4294967068UL
441#define CMD_MEMCPY 4294967069UL
442#define CMD_APPEND 4294967070UL
443#define CMD_SNAPSHOT 4294967071UL
444#define CMD_BITMAP_TRANSFORM 4294967073UL
445#define CMD_INFLATE 4294967074UL
446#define CMD_GETPTR 4294967075UL
447#define CMD_LOADIMAGE 4294967076UL
448#define CMD_GETPROPS 4294967077UL
449#define CMD_LOADIDENTITY 4294967078UL
450#define CMD_TRANSLATE 4294967079UL
451#define CMD_SCALE 4294967080UL
452#define CMD_ROTATE 4294967081UL
453#define CMD_SETMATRIX 4294967082UL
454#define CMD_SETFONT 4294967083UL
455#define CMD_TRACK 4294967084UL
456#define CMD_DIAL 4294967085UL
457#define CMD_NUMBER 4294967086UL
458#define CMD_SCREENSAVER 4294967087UL
459#define CMD_SKETCH 4294967088UL
460#define CMD_LOGO 4294967089UL
461#define CMD_COLDSTART 4294967090UL
462#define CMD_GETMATRIX 4294967091UL
463#define CMD_GRADCOLOR 4294967092UL
465
468#if defined(FT_80X_ENABLE) || defined(EVE_MULTI_GRAPHICS_TARGET)
469#define CMD_CSKETCH 4294967093UL
470#endif
472
475#if defined(FT_81X_ENABLE) || defined(BT_88X_ENABLE) || defined(BT_81X_ENABLE) || defined(BT_81XA_ENABLE) || defined(EVE_MULTI_GRAPHICS_TARGET)
476#define CMD_SETROTATE 4294967094UL
477#define CMD_SNAPSHOT2 4294967095UL
478#define CMD_SETBASE 4294967096UL
479#define CMD_MEDIAFIFO 4294967097UL
480#define CMD_PLAYVIDEO 4294967098UL
481#define CMD_SETFONT2 4294967099UL
482#define CMD_SETSCRATCH 4294967100UL
483#define CMD_ROMFONT 4294967103UL
484#define CMD_VIDEOSTART 4294967104UL
485#define CMD_VIDEOFRAME 4294967105UL
486#define CMD_SYNC 4294967106UL
487#define CMD_SETBITMAP 4294967107UL
488#endif
490
493#if defined(BT_81X_ENABLE) || defined(BT_81XA_ENABLE) || defined(EVE_MULTI_GRAPHICS_TARGET)
494#define CMD_FLASHERASE 4294967108UL
495#define CMD_FLASHWRITE 4294967109UL
496#define CMD_FLASHREAD 4294967110UL
497#define CMD_FLASHUPDATE 4294967111UL
498#define CMD_FLASHDETACH 4294967112UL
499#define CMD_FLASHATTACH 4294967113UL
500#define CMD_FLASHFAST 4294967114UL
501#define CMD_FLASHSPIDESEL 4294967115UL
502#define CMD_FLASHSPITX 4294967116UL
503#define CMD_FLASHSPIRX 4294967117UL
504#define CMD_FLASHSOURCE 4294967118UL
505#define CMD_CLEARCACHE 4294967119UL
506#define CMD_INFLATE2 4294967120UL
507#define CMD_ROTATEAROUND 4294967121UL
508#define CMD_RESETFONTS 4294967122UL
509#define CMD_ANIMSTART 4294967123UL
510#define CMD_ANIMSTOP 4294967124UL
511#define CMD_ANIMXY 4294967125UL
512#define CMD_ANIMDRAW 4294967126UL
513#define CMD_GRADIENTA 4294967127UL
514#define CMD_FILLWIDTH 4294967128UL
515#define CMD_APPENDF 4294967129UL
516#define CMD_ANIMFRAME 4294967130UL
517#define CMD_NOP 4294967131UL
518#define CMD_VIDEOSTARTF 4294967135UL
519#endif
521
524#if defined(BT_81XA_ENABLE) || defined(EVE_MULTI_GRAPHICS_TARGET)
525#define CMD_CALIBRATESUB 4294967136UL
526#define CMD_TESTCARD 4294967137UL
527#define CMD_HSF 4294967138UL
528#define CMD_APILEVEL 4294967139UL
529#define CMD_GETIMAGE 4294967140UL
530#define CMD_WAIT 4294967141UL
531#define CMD_RETURN 4294967142UL
532#define CMD_CALLLIST 4294967143UL
533#define CMD_NEWLIST 4294967144UL
534#define CMD_ENDLIST 4294967145UL
535#define CMD_PCLKFREQ 4294967146UL
536#define CMD_FONTCACHE 4294967147UL
537#define CMD_FONTCACHEQUERY 4294967148UL
538#define CMD_ANIMFRAMERAM 4294967149UL
539#define CMD_ANIMSTARTRAM 4294967150UL
540#define CMD_RUNANIM 4294967151UL
541#define CMD_FLASHPROGRAM 4294967152UL
542#endif
543
544// clang-format on
546
547/*****************
548** Display List **
549*****************/
550
553
554#define VERTEX2F(x, y) ((1UL << 30) | (((x)&32767UL) << 15) | (((y)&32767UL) << 0))
555#define VERTEX2II(x, y, handle, cell) ((2UL << 30) | (((x)&511UL) << 21) | (((y)&511UL) << 12) | (((handle)&31UL) << 7) | (((cell)&127UL) << 0))
556#define BITMAP_SOURCE(addr) ((1UL << 24) | ((addr) < 0 ? (((addr) & (BITMAP_ADDR_MASK >> 1))) : ((addr)&BITMAP_ADDR_MASK)))
557#define BITMAP_SOURCE2(flash_or_ram, addr) ((1UL << 24) | ((flash_or_ram) << 23) | (((addr) & (BITMAP_ADDR_MASK >> 1)) << 0))
558#define CLEAR_COLOR_RGB(red, green, blue) ((2UL << 24) | (((red)&255UL) << 16) | (((green)&255UL) << 8) | (((blue)&255UL) << 0))
559#define TAG(s) ((3UL << 24) | (((s)&255UL) << 0))
560#define COLOR_RGB(red, green, blue) ((4UL << 24) | (((red)&255UL) << 16) | (((green)&255UL) << 8) | (((blue)&255UL) << 0))
561#define BITMAP_HANDLE(handle) ((5UL << 24) | (((handle)&31UL) << 0))
562#define CELL(cell) ((6UL << 24) | (((cell)&127UL) << 0))
563#define BITMAP_LAYOUT(format, linestride, height) ((7UL << 24) | (((format)&31UL) << 19) | (((linestride)&1023UL) << 9) | (((height)&511UL) << 0))
564#define BITMAP_SIZE(filter, wrapx, wrapy, width, height) ((8UL << 24) | (((filter)&1UL) << 20) | (((wrapx)&1UL) << 19) | (((wrapy)&1UL) << 18) | (((width)&511UL) << 9) | (((height)&511UL) << 0))
565#define ALPHA_FUNC(func, ref) ((9UL << 24) | (((func)&7UL) << 8) | (((ref)&255UL) << 0))
566#define STENCIL_FUNC(func, ref, mask) ((10UL << 24) | (((func)&7UL) << 16) | (((ref)&255UL) << 8) | (((mask)&255UL) << 0))
567#define BLEND_FUNC(src, dst) ((11UL << 24) | (((src)&7UL) << 3) | (((dst)&7UL) << 0))
568#define STENCIL_OP(sfail, spass) ((12UL << 24) | (((sfail)&7UL) << 3) | (((spass)&7UL) << 0))
569#define POINT_SIZE(size) ((13UL << 24) | (((size)&8191UL) << 0))
570#define LINE_WIDTH(width) ((14UL << 24) | (((width)&4095UL) << 0))
571#define CLEAR_COLOR_A(alpha) ((15UL << 24) | (((alpha)&255UL) << 0))
572#define COLOR_A(alpha) ((16UL << 24) | (((alpha)&255UL) << 0))
573#define CLEAR_STENCIL(s) ((17UL << 24) | (((s)&255UL) << 0))
574#define CLEAR_TAG(s) ((18UL << 24) | (((s)&255UL) << 0))
575#define STENCIL_MASK(mask) ((19UL << 24) | (((mask)&255UL) << 0))
576#define TAG_MASK(mask) ((20UL << 24) | (((mask)&1UL) << 0))
577#define BITMAP_TRANSFORM_C(c) ((23UL << 24) | (((c)&16777215UL) << 0))
578#define BITMAP_TRANSFORM_F(f) ((26UL << 24) | (((f)&16777215UL) << 0))
579#define BITMAP_TRANSFORM_A_EXT(p, v) ((21UL << 24) | (((p)&1UL) << 17) | (((v)&131071UL) << 0))
580#define BITMAP_TRANSFORM_B_EXT(p, v) ((22UL << 24) | (((p)&1UL) << 17) | (((v)&131071UL) << 0))
581#define BITMAP_TRANSFORM_D_EXT(p, v) ((24UL << 24) | (((p)&1UL) << 17) | (((v)&131071UL) << 0))
582#define BITMAP_TRANSFORM_E_EXT(p, v) ((25UL << 24) | (((p)&1UL) << 17) | (((v)&131071UL) << 0))
583#define BITMAP_TRANSFORM_A(a) BITMAP_TRANSFORM_A_EXT(0, a)
584#define BITMAP_TRANSFORM_B(b) BITMAP_TRANSFORM_B_EXT(0, b)
585#define BITMAP_TRANSFORM_D(d) BITMAP_TRANSFORM_D_EXT(0, d)
586#define BITMAP_TRANSFORM_E(e) BITMAP_TRANSFORM_E_EXT(0, e)
587#define SCISSOR_XY(x, y) ((27UL << 24) | (((x)&SCISSOR_XY_MASK) << SCISSOR_XY_SHIFT) | (((y)&SCISSOR_XY_MASK) << 0))
588#define SCISSOR_SIZE(width, height) ((28UL << 24) | (((width)&SCISSOR_SIZE_MASK) << SCISSOR_SIZE_SHIFT) | (((height)&SCISSOR_SIZE_MASK) << 0))
589#define CALL(dest) ((29UL << 24) | (((dest)&65535UL) << 0))
590#define JUMP(dest) ((30UL << 24) | (((dest)&65535UL) << 0))
591#define BEGIN(prim) ((31UL << 24) | (((prim)&15UL) << 0))
592#define COLOR_MASK(r, g, b, a) ((32UL << 24) | (((r)&1UL) << 3) | (((g)&1UL) << 2) | (((b)&1UL) << 1) | (((a)&1UL) << 0))
593#define CLEAR(c, s, t) ((38UL << 24) | (((c)&1UL) << 2) | (((s)&1UL) << 1) | (((t)&1UL) << 0))
594#define VERTEX_FORMAT(frac) ((39UL << 24) | (((frac)&7UL) << 0))
595#define BITMAP_LAYOUT_H(linestride, height) ((40UL << 24) | (((linestride)&3UL) << 2) | (((height)&3UL) << 0))
596#define BITMAP_SIZE_H(width, height) ((41UL << 24) | (((width)&3UL) << 2) | (((height)&3UL) << 0))
597#define PALETTE_SOURCE(addr) ((42UL << 24) | (((addr)&4194303UL) << 0))
598#define VERTEX_TRANSLATE_X(x) ((43UL << 24) | (((x)&131071UL) << 0))
599#define VERTEX_TRANSLATE_Y(y) ((44UL << 24) | (((y)&131071UL) << 0))
600#define NOP() ((45UL << 24))
601#define BITMAP_EXT_FORMAT(format) ((46UL << 24) | (((format)&65535UL) << 0))
602#define BITMAP_SWIZZLE(r, g, b, a) ((47UL << 24) | (((r)&7UL) << 9) | (((g)&7UL) << 6) | (((b)&7UL) << 3) | (((a)&7UL) << 0))
603#define INT_FRR() ((48UL << 24))
604#define END() ((33UL << 24))
605#define SAVE_CONTEXT() ((34UL << 24))
606#define RESTORE_CONTEXT() ((35UL << 24))
607#define RETURN() ((36UL << 24))
608#define MACRO(m) ((37UL << 24) | (((m)&1UL) << 0))
609#define DISPLAY() ((0UL << 24))
611
612/************
613** Options **
614************/
615
618
619#ifdef POINTS
620#undef POINTS
621#endif
622
623#define DLSWAP_DONE 0UL
624#define DLSWAP_LINE 1UL
625#define DLSWAP_FRAME 2UL
626
627ESD_ENUM(Ft_CoPro_Opt, Type = uint16_t, Include = "EVE_Hal.h", Flags)
628#define OPT_MONO 1UL
629#define OPT_NODL 2UL
630#define OPT_NOTEAR 4UL
631#define OPT_FULLSCREEN 8UL
632#define OPT_MEDIAFIFO 16UL
633#define OPT_SOUND 32UL
634#define OPT_FLASH 64UL
635#define OPT_OVERLAY 128UL
636#define OPT_FLAT 256UL
637#define OPT_SIGNED 256UL
638#define OPT_DITHER 256UL
639#define OPT_CENTERX 512UL
640#define OPT_CENTERY 1024UL
641#define OPT_CENTER 1536UL
642#define OPT_FORMAT 4096UL
643#define OPT_NOBACK 4096UL
644#define OPT_FILL 8192UL
645#define OPT_NOHM 16384UL
646#define OPT_NOPOINTER 16384UL
647#define OPT_NOSECS 32768UL
648#define OPT_NOHANDS 49152UL
649#define OPT_NOTICKS 8192UL
650#define OPT_RIGHTX 2048UL
651ESD_END()
652
653
654#define ANIM_ONCE 0UL
655#define ANIM_LOOP 1UL
656#define ANIM_HOLD 2UL
657
658#define COMPRESSED_RGBA_ASTC_4x4_KHR 37808UL
659#define COMPRESSED_RGBA_ASTC_5x4_KHR 37809UL
660#define COMPRESSED_RGBA_ASTC_5x5_KHR 37810UL
661#define COMPRESSED_RGBA_ASTC_6x5_KHR 37811UL
662#define COMPRESSED_RGBA_ASTC_6x6_KHR 37812UL
663#define COMPRESSED_RGBA_ASTC_8x5_KHR 37813UL
664#define COMPRESSED_RGBA_ASTC_8x6_KHR 37814UL
665#define COMPRESSED_RGBA_ASTC_8x8_KHR 37815UL
666#define COMPRESSED_RGBA_ASTC_10x5_KHR 37816UL
667#define COMPRESSED_RGBA_ASTC_10x6_KHR 37817UL
668#define COMPRESSED_RGBA_ASTC_10x8_KHR 37818UL
669#define COMPRESSED_RGBA_ASTC_10x10_KHR 37819UL
670#define COMPRESSED_RGBA_ASTC_12x10_KHR 37820UL
671#define COMPRESSED_RGBA_ASTC_12x12_KHR 37821UL
672
673#define FLASH_DEFAULT_SHA1KEY 0xf589cf07
674
675#define KEEP 1UL
676#define REPLACE 2UL
677#define INCR 3UL
678#define DECR 4UL
679#define INVERT 5UL
680
681#define ZERO 0UL
682#define ONE 1UL
683#define SRC_ALPHA 2UL
684#define DST_ALPHA 3UL
685#define ONE_MINUS_SRC_ALPHA 4UL
686#define ONE_MINUS_DST_ALPHA 5UL
687
688#define RED 2UL
689#define GREEN 3UL
690#define BLUE 4UL
691#define ALPHA 5UL
692
693#define NEVER 0UL
694#define LESS 1UL
695#define LEQUAL 2UL
696#define GREATER 3UL
697#define GEQUAL 4UL
698#define EQUAL 5UL
699#define NOTEQUAL 6UL
700#define ALWAYS 7UL
701
702#define ARGB1555 0UL
703#define L1 1UL
704#define L4 2UL
705#define L8 3UL
706#define RGB332 4UL
707#define ARGB2 5UL
708#define ARGB4 6UL
709#define RGB565 7UL
710#define PALETTED 8UL
711#define TEXT8X8 9UL
712#define TEXTVGA 10UL
713#define BARGRAPH 11UL
714#define PALETTED565 14UL
715#define PALETTED4444 15UL
716#define PALETTED8 16UL
717#define L2 17UL
718#define GLFORMAT 31UL
719
720#define FLASH_STATUS_INIT 0UL
721#define FLASH_STATUS_DETACHED 1UL
722#define FLASH_STATUS_BASIC 2UL
723#define FLASH_STATUS_FULL 3UL
724
725#define NEAREST 0UL
726#define BILINEAR 1UL
727
728#define LINEAR_SAMPLES 0UL
729#define ULAW_SAMPLES 1UL
730#define ADPCM_SAMPLES 2UL
731
732#define BITMAPS 1UL
733#define POINTS 2UL
734#define LINES 3UL
735#define LINE_STRIP 4UL
736#define EDGE_STRIP_R 5UL
737#define EDGE_STRIP_L 6UL
738#define EDGE_STRIP_A 7UL
739#define EDGE_STRIP_B 8UL
740#define RECTS 9UL
741
742#define FTPOINTS POINTS
743
744#define TOUCHMODE_OFF 0UL
745#define TOUCHMODE_ONESHOT 1UL
746#define TOUCHMODE_FRAME 2UL
747#define TOUCHMODE_CONTINUOUS 3UL
748
749#define BORDER 0UL
750#define REPEAT 1UL
751
752#define ADC_SINGLE_ENDED 0UL
753#define ADC_DIFFERENTIAL 1UL
754
755#define CTOUCH_MODE_COMPATIBILITY 1UL
756#define CTOUCH_MODE_EXTENDED 0UL
757
758#define INT_SWAP 1UL
759#define INT_TOUCH 2UL
760#define INT_TAG 4UL
761#define INT_SOUND 8UL
762#define INT_L8C 12UL
763#define INT_VGA 13UL
764#define INT_G8 18UL
765#define INT_PLAYBACK 16UL
766#define INT_CMDEMPTY 32UL
767#define INT_CMDFLAG 64UL
768#define INT_CONVCOMPLETE 128UL
769#define INT_UNDERRUN 256UL
770
771#endif /* #ifndef EVE_GPU_DEFS__H */
772
773/* end of file */
#define ESD_END()
Definition EVE_GpuDefs.h:43
#define ESD_ENUM(name,...)
Definition EVE_GpuDefs.h:42
unsigned short uint16_t