Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of FT810 by
FT_Gpu.h
00001 #ifndef _FT_GPU_H_ 00002 #define _FT_GPU_H_ 00003 00004 /* Definitions used for FT800 co processor command buffer */ 00005 #define FT_DL_SIZE (8*1024L) //8KB Display List buffer size 00006 #define FT_CMD_FIFO_SIZE (4*1024L) //4KB coprocessor Fifo size 00007 #define FT_CMD_SIZE (4) //4 byte per coprocessor command of EVE 00008 00009 00010 /* For FT801, FT811 and FT813 */ 00011 #define CTOUCH_MODE_COMPATIBILITY 1 00012 #define CTOUCH_MODE_EXTENDED 0 00013 00014 #define LOW_FREQ_BOUND 58800000L//98% of 60Mhz 00015 00016 #define RAM_G_SIZE 1024*1024L 00017 #define FT81X_VERSION "1.0.4" 00018 00019 #define DL_CLEAR 0x26000000UL /* requires OR'd arguments */ 00020 #define DL_CLEAR_RGB 0x02000000UL /* requires OR'd arguments */ 00021 #define DL_COLOR_RGB 0x04000000UL /* requires OR'd arguments */ 00022 #define DL_POINT_SIZE 0x0D000000UL /* requires OR'd arguments */ 00023 #define DL_END 0x21000000UL 00024 #define DL_BEGIN 0x1F000000UL /* requires OR'd arguments */ 00025 #define DL_DISPLAY 0x00000000UL 00026 00027 #define CLR_COL 0x4 00028 #define CLR_STN 0x2 00029 #define CLR_TAG 0x1 00030 00031 /* Host commands */ 00032 #define FT8_ACTIVE 0x00 /* place FT8xx in active state */ 00033 #define FT8_STANDBY 0x41 /* place FT8xx in Standby (clk running) */ 00034 #define FT8_SLEEP 0x42 /* place FT8xx in Sleep (clk off) */ 00035 #define FT8_PWRDOWN 0x50 /* place FT8xx in Power Down (core off) */ 00036 #define FT8_CLKEXT 0x44 /* select external clock source */ 00037 #define FT8_CLKINT 0x48 /* select internal clock source */ 00038 #define FT8_CORERST 0x68 /* reset core - all registers default and processors reset */ 00039 #define FT8_CLK48M 0x62 /* select 48MHz PLL output */ 00040 #define FT8_CLK36M 0x61 /* select 36MHz PLL output */ 00041 00042 00043 /* defines used for graphics commands */ 00044 #define FT8_NEVER 0UL 00045 #define FT8_LESS 1UL 00046 #define FT8_LEQUAL 2UL 00047 #define FT8_GREATER 3UL 00048 #define FT8_GEQUAL 4UL 00049 #define FT8_EQUAL 5UL 00050 #define FT8_NOTEQUAL 6UL 00051 #define FT8_ALWAYS 7UL 00052 00053 00054 /* Bitmap formats */ 00055 #define FT8_ARGB1555 0UL 00056 #define FT8_L1 1UL 00057 #define FT8_L4 2UL 00058 #define FT8_L8 3UL 00059 #define FT8_RGB332 4UL 00060 #define FT8_ARGB2 5UL 00061 #define FT8_ARGB4 6UL 00062 #define FT8_RGB565 7UL 00063 #define FT8_PALETTED 8UL 00064 #define FT8_TEXT8X8 9UL 00065 #define FT8_TEXTVGA 10UL 00066 #define FT8_BARGRAPH 11UL 00067 00068 00069 /* Bitmap filter types */ 00070 #define FT8_NEAREST 0UL 00071 #define FT8_BILINEAR 1UL 00072 00073 00074 /* Bitmap wrap types */ 00075 #define FT8_BORDER 0UL 00076 #define FT8_REPEAT 1UL 00077 00078 00079 /* Stencil defines */ 00080 #define FT8_KEEP 1UL 00081 #define FT8_REPLACE 2UL 00082 #define FT8_INCR 3UL 00083 #define FT8_DECR 4UL 00084 #define FT8_INVERT 5UL 00085 00086 00087 /* Graphics display list swap defines */ 00088 #define FT8_DLSWAP_DONE 0UL 00089 #define FT8_DLSWAP_LINE 1UL 00090 #define FT8_DLSWAP_FRAME 2UL 00091 00092 00093 /* Interrupt bits */ 00094 #define FT8_INT_SWAP 0x01 00095 #define FT8_INT_TOUCH 0x02 00096 #define FT8_INT_TAG 0x04 00097 #define FT8_INT_SOUND 0x08 00098 #define FT8_INT_PLAYBACK 0x10 00099 #define FT8_INT_CMDEMPTY 0x20 00100 #define FT8_INT_CMDFLAG 0x40 00101 #define FT8_INT_CONVCOMPLETE 0x80 00102 00103 00104 /* Touch mode */ 00105 #define FT8_TMODE_OFF 0 00106 #define FT8_TMODE_ONESHOT 1 00107 #define FT8_TMODE_FRAME 2 00108 #define FT8_TMODE_CONTINUOUS 3 00109 00110 00111 /* Alpha blending */ 00112 #define FT8_ZERO 0UL 00113 #define FT8_ONE 1UL 00114 #define FT8_SRC_ALPHA 2UL 00115 #define FT8_DST_ALPHA 3UL 00116 #define FT8_ONE_MINUS_SRC_ALPHA 4UL 00117 #define FT8_ONE_MINUS_DST_ALPHA 5UL 00118 00119 00120 /* Graphics primitives */ 00121 #define FT8_BITMAPS 1UL 00122 #define FT8_POINTS 2UL 00123 #define FT8_LINES 3UL 00124 #define FT8_LINE_STRIP 4UL 00125 #define FT8_EDGE_STRIP_R 5UL 00126 #define FT8_EDGE_STRIP_L 6UL 00127 #define FT8_EDGE_STRIP_A 7UL 00128 #define FT8_EDGE_STRIP_B 8UL 00129 #define FT8_RECTS 9UL 00130 00131 00132 /* Widget command */ 00133 #define FT8_OPT_MONO 1 00134 #define FT8_OPT_NODL 2 00135 #define FT8_OPT_FLAT 256 00136 #define FT8_OPT_CENTERX 512 00137 #define FT8_OPT_CENTERY 1024 00138 #define FT8_OPT_CENTER (FT8_OPT_CENTERX | FT8_OPT_CENTERY) 00139 #define FT8_OPT_NOBACK 4096 00140 #define FT8_OPT_NOTICKS 8192 00141 #define FT8_OPT_NOHM 16384 00142 #define FT8_OPT_NOPOINTER 16384 00143 #define FT8_OPT_NOSECS 32768 00144 #define FT8_OPT_NOHANDS 49152 00145 #define FT8_OPT_RIGHTX 2048 00146 #define FT8_OPT_SIGNED 256 00147 00148 00149 /* Defines related to inbuilt font */ 00150 #define FT8_NUMCHAR_PERFONT (128L) /* number of font characters per bitmap handle */ 00151 #define FT8_FONT_TABLE_SIZE (148L) /* size of the font table - utilized for loopup by the graphics engine */ 00152 #define FT8_FONT_TABLE_POINTER (0xFFFFCUL) /* pointer to the inbuilt font tables starting from bitmap handle 16 */ 00153 00154 00155 /* Audio sample type defines */ 00156 #define FT8_LINEAR_SAMPLES 0UL /* 8bit signed samples */ 00157 #define FT8_ULAW_SAMPLES 1UL /* 8bit ulaw samples */ 00158 #define FT8_ADPCM_SAMPLES 2UL /* 4bit ima adpcm samples */ 00159 00160 00161 /* Synthesized sound */ 00162 #define FT8_SILENCE 0x00 00163 #define FT8_SQUAREWAVE 0x01 00164 #define FT8_SINEWAVE 0x02 00165 #define FT8_SAWTOOTH 0x03 00166 #define FT8_TRIANGLE 0x04 00167 #define FT8_BEEPING 0x05 00168 #define FT8_ALARM 0x06 00169 #define FT8_WARBLE 0x07 00170 #define FT8_CAROUSEL 0x08 00171 #define FT8_PIPS(n) (0x0F + (n)) 00172 #define FT8_HARP 0x40 00173 #define FT8_XYLOPHONE 0x41 00174 #define FT8_TUBA 0x42 00175 #define FT8_GLOCKENSPIEL 0x43 00176 #define FT8_ORGAN 0x44 00177 #define FT8_TRUMPET 0x45 00178 #define FT8_PIANO 0x46 00179 #define FT8_CHIMES 0x47 00180 #define FT8_MUSICBOX 0x48 00181 #define FT8_BELL 0x49 00182 #define FT8_CLICK 0x50 00183 #define FT8_SWITCH 0x51 00184 #define FT8_COWBELL 0x52 00185 #define FT8_NOTCH 0x53 00186 #define FT8_HIHAT 0x54 00187 #define FT8_KICKDRUM 0x55 00188 #define FT8_POP 0x56 00189 #define FT8_CLACK 0x57 00190 #define FT8_CHACK 0x58 00191 #define FT8_MUTE 0x60 00192 #define FT8_UNMUTE 0x61 00193 00194 00195 /* Synthesized sound frequencies, midi note */ 00196 #define FT8_MIDI_A0 21 00197 #define FT8_MIDI_A_0 22 00198 #define FT8_MIDI_B0 23 00199 #define FT8_MIDI_C1 24 00200 #define FT8_MIDI_C_1 25 00201 #define FT8_MIDI_D1 26 00202 #define FT8_MIDI_D_1 27 00203 #define FT8_MIDI_E1 28 00204 #define FT8_MIDI_F1 29 00205 #define FT8_MIDI_F_1 30 00206 #define FT8_MIDI_G1 31 00207 #define FT8_MIDI_G_1 32 00208 #define FT8_MIDI_A1 33 00209 #define FT8_MIDI_A_1 34 00210 #define FT8_MIDI_B1 35 00211 #define FT8_MIDI_C2 36 00212 #define FT8_MIDI_C_2 37 00213 #define FT8_MIDI_D2 38 00214 #define FT8_MIDI_D_2 39 00215 #define FT8_MIDI_E2 40 00216 #define FT8_MIDI_F2 41 00217 #define FT8_MIDI_F_2 42 00218 #define FT8_MIDI_G2 43 00219 #define FT8_MIDI_G_2 44 00220 #define FT8_MIDI_A2 45 00221 #define FT8_MIDI_A_2 46 00222 #define FT8_MIDI_B2 47 00223 #define FT8_MIDI_C3 48 00224 #define FT8_MIDI_C_3 49 00225 #define FT8_MIDI_D3 50 00226 #define FT8_MIDI_D_3 51 00227 #define FT8_MIDI_E3 52 00228 #define FT8_MIDI_F3 53 00229 #define FT8_MIDI_F_3 54 00230 #define FT8_MIDI_G3 55 00231 #define FT8_MIDI_G_3 56 00232 #define FT8_MIDI_A3 57 00233 #define FT8_MIDI_A_3 58 00234 #define FT8_MIDI_B3 59 00235 #define FT8_MIDI_C4 60 00236 #define FT8_MIDI_C_4 61 00237 #define FT8_MIDI_D4 62 00238 #define FT8_MIDI_D_4 63 00239 #define FT8_MIDI_E4 64 00240 #define FT8_MIDI_F4 65 00241 #define FT8_MIDI_F_4 66 00242 #define FT8_MIDI_G4 67 00243 #define FT8_MIDI_G_4 68 00244 #define FT8_MIDI_A4 69 00245 #define FT8_MIDI_A_4 70 00246 #define FT8_MIDI_B4 71 00247 #define FT8_MIDI_C5 72 00248 #define FT8_MIDI_C_5 73 00249 #define FT8_MIDI_D5 74 00250 #define FT8_MIDI_D_5 75 00251 #define FT8_MIDI_E5 76 00252 #define FT8_MIDI_F5 77 00253 #define FT8_MIDI_F_5 78 00254 #define FT8_MIDI_G5 79 00255 #define FT8_MIDI_G_5 80 00256 #define FT8_MIDI_A5 81 00257 #define FT8_MIDI_A_5 82 00258 #define FT8_MIDI_B5 83 00259 #define FT8_MIDI_C6 84 00260 #define FT8_MIDI_C_6 85 00261 #define FT8_MIDI_D6 86 00262 #define FT8_MIDI_D_6 87 00263 #define FT8_MIDI_E6 88 00264 #define FT8_MIDI_F6 89 00265 #define FT8_MIDI_F_6 90 00266 #define FT8_MIDI_G6 91 00267 #define FT8_MIDI_G_6 92 00268 #define FT8_MIDI_A6 93 00269 #define FT8_MIDI_A_6 94 00270 #define FT8_MIDI_B6 95 00271 #define FT8_MIDI_C7 96 00272 #define FT8_MIDI_C_7 97 00273 #define FT8_MIDI_D7 98 00274 #define FT8_MIDI_D_7 99 00275 #define FT8_MIDI_E7 100 00276 #define FT8_MIDI_F7 101 00277 #define FT8_MIDI_F_7 102 00278 #define FT8_MIDI_G7 103 00279 #define FT8_MIDI_G_7 104 00280 #define FT8_MIDI_A7 105 00281 #define FT8_MIDI_A_7 106 00282 #define FT8_MIDI_B7 107 00283 #define FT8_MIDI_C8 108 00284 00285 00286 /* GPIO bits */ 00287 #define FT8_GPIO0 0 00288 #define FT8_GPIO1 1 /* default gpio pin for audio shutdown, 1 - eanble, 0 - disable */ 00289 #define FT8_GPIO7 7 /* default gpio pin for display enable, 1 - enable, 0 - disable */ 00290 00291 00292 /* Display rotation */ 00293 #define FT8_DISPLAY_0 0 /* 0 degrees rotation */ 00294 #define FT8_DISPLAY_180 1 /* 180 degrees rotation */ 00295 #define FT8_DISPLAY_90 1 /* 90 degrees rotation */ 00296 #define FT8_DISPLAY_270 1 /* 270 degrees rotation */ 00297 00298 #define FT8_DISPLAY_LANDSCAPE_0 0 /* 0 degrees rotation */ 00299 #define FT8_DISPLAY_LANDSCAPE_180 1 /* 180 degrees rotation */ 00300 #define FT8_DISPLAY_PORTRAIT_90CCW 2 /* 270 degrees rotation */ 00301 #define FT8_DISPLAY_PORTRAIT_90CW 3 /* 90 degrees rotation */ 00302 00303 00304 // 0 ARGB1555 00305 // 1 L1 00306 // 2 L4 00307 // 3 L8 00308 // 4 RGB332 00309 // 5 ARGB2 00310 // 6 ARGB4 00311 // 7 RGB565 00312 // 8 PALETTED 00313 // 9 TEXT8X8 00314 // 10 TEXTVGA 00315 // 11 BARGRAPH 00316 // 14 PALETTED565 00317 // 15 PALETTED4444 00318 // 16 PALETTED8 00319 // 17 L2 00320 00321 // 0 OPT_RGB565 00322 // 1 OPT_MONO 00323 // 2 OPT_NODL 00324 // 256 OPT_FLAT 00325 // 256 OPT_SIGNED 00326 // 512 OPT_CENTERX 00327 // 1024 OPT_CENTERY 00328 // 1536 OPT_CENTER 00329 // 2048 OPT_RIGHTX 00330 // 4096 OPT_NOBACK 00331 // 8192 OPT_NOTICKS 00332 00333 #define ADC_DIFFERENTIAL 1UL 00334 #define ADC_SINGLE_ENDED 0UL 00335 #define ADPCM_SAMPLES 2UL 00336 #define ALWAYS 7UL 00337 #define ARGB1555 0UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00338 #define ARGB2 5UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00339 #define ARGB4 6UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00340 #define BARGRAPH 11UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00341 #define BILINEAR 1UL 00342 #define BITMAPS 1UL 00343 #define BORDER 0UL 00344 #define CMDBUF_SIZE 4096UL 00345 #define CMD_APPEND 4294967070UL 00346 #define CMD_BGCOLOR 4294967049UL 00347 #define CMD_BITMAP_TRANSFORM 4294967073UL 00348 #define CMD_BUTTON 4294967053UL 00349 #define CMD_CALIBRATE 4294967061UL 00350 #define CMD_CLOCK 4294967060UL 00351 #define CMD_COLDSTART 4294967090UL 00352 #define CMD_CRC 4294967043UL 00353 #define CMD_CSKETCH 4294967093UL 00354 #define CMD_DIAL 4294967085UL 00355 #define CMD_DLSTART 4294967040UL 00356 #define CMD_EXECUTE 4294967047UL 00357 #define CMD_FGCOLOR 4294967050UL 00358 #define CMD_GAUGE 4294967059UL 00359 #define CMD_GETMATRIX 4294967091UL 00360 #define CMD_GETPOINT 4294967048UL 00361 #define CMD_GETPROPS 4294967077UL 00362 #define CMD_GETPTR 4294967075UL 00363 #define CMD_GRADCOLOR 4294967092UL 00364 #define CMD_GRADIENT 4294967051UL 00365 #define CMD_HAMMERAUX 4294967044UL 00366 #define CMD_IDCT_DELETED 4294967046UL 00367 #define CMD_INFLATE 4294967074UL 00368 #define CMD_INTERRUPT 4294967042UL 00369 #define CMD_INT_RAMSHARED 4294967101UL 00370 #define CMD_INT_SWLOADIMAGE 4294967102UL 00371 #define CMD_KEYS 4294967054UL 00372 #define CMD_LOADIDENTITY 4294967078UL 00373 #define CMD_LOADIMAGE 4294967076UL 00374 #define CMD_LOGO 4294967089UL 00375 #define CMD_MARCH 4294967045UL 00376 #define CMD_MEDIAFIFO 4294967097UL 00377 #define CMD_MEMCPY 4294967069UL 00378 #define CMD_MEMCRC 4294967064UL 00379 #define CMD_MEMSET 4294967067UL 00380 #define CMD_MEMWRITE 4294967066UL 00381 #define CMD_MEMZERO 4294967068UL 00382 #define CMD_NUMBER 4294967086UL 00383 #define CMD_PLAYVIDEO 4294967098UL 00384 #define CMD_PROGRESS 4294967055UL 00385 #define CMD_REGREAD 4294967065UL 00386 #define CMD_ROMFONT 4294967103UL 00387 #define CMD_ROTATE 4294967081UL 00388 #define CMD_SCALE 4294967080UL 00389 #define CMD_SCREENSAVER 4294967087UL 00390 #define CMD_SCROLLBAR 4294967057UL 00391 #define CMD_SETBASE 4294967096UL 00392 #define CMD_SETBITMAP 4294967107UL 00393 #define CMD_SETFONT 4294967083UL 00394 #define CMD_SETFONT2 4294967099UL 00395 #define CMD_SETMATRIX 4294967082UL 00396 #define CMD_SETROTATE 4294967094UL 00397 #define CMD_SETSCRATCH 4294967100UL 00398 #define CMD_SKETCH 4294967088UL 00399 #define CMD_SLIDER 4294967056UL 00400 #define CMD_SNAPSHOT 4294967071UL 00401 #define CMD_SNAPSHOT2 4294967095UL 00402 #define CMD_SPINNER 4294967062UL 00403 #define CMD_STOP 4294967063UL 00404 #define CMD_SWAP 4294967041UL 00405 #define CMD_SYNC 4294967106UL 00406 #define CMD_TEXT 4294967052UL 00407 #define CMD_TOGGLE 4294967058UL 00408 #define CMD_TOUCH_TRANSFORM 4294967072UL 00409 #define CMD_TRACK 4294967084UL 00410 #define CMD_TRANSLATE 4294967079UL 00411 #define CMD_VIDEOFRAME 4294967105UL 00412 #define CMD_VIDEOSTART 4294967104UL 00413 #define DECR 4UL 00414 #define DLSWAP_DONE 0UL 00415 #define DLSWAP_FRAME 2UL 00416 #define DLSWAP_LINE 1UL 00417 #define DST_ALPHA 3UL 00418 #define EDGE_STRIP_A 7UL 00419 #define EDGE_STRIP_B 8UL 00420 #define EDGE_STRIP_L 6UL 00421 #define EDGE_STRIP_R 5UL 00422 #define EQUAL 5UL 00423 #define GEQUAL 4UL 00424 #define GREATER 3UL 00425 #define INCR 3UL 00426 #define INT_CMDEMPTY 32UL 00427 #define INT_CMDFLAG 64UL 00428 #define INT_CONVCOMPLETE 128UL 00429 #define INT_G8 18UL 00430 #define INT_L8C 12UL 00431 #define INT_PLAYBACK 16UL 00432 #define INT_SOUND 8UL 00433 #define INT_SWAP 1UL 00434 #define INT_TAG 4UL 00435 #define INT_TOUCH 2UL 00436 #define INT_VGA 13UL 00437 #define INVERT 5UL 00438 #define KEEP 1UL 00439 #define L1 1UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00440 #define L2 17UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00441 #define L4 2UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00442 #define L8 3UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2 00443 #define LEQUAL 2UL 00444 #define LESS 1UL 00445 #define LINEAR_SAMPLES 0UL 00446 #define LINES 3UL 00447 #define LINE_STRIP 4UL 00448 #define NEAREST 0UL 00449 #define NEVER 0UL 00450 #define NOTEQUAL 6UL 00451 #define ONE 1UL 00452 #define ONE_MINUS_DST_ALPHA 5UL 00453 #define ONE_MINUS_SRC_ALPHA 4UL 00454 #define OPT_CENTER 1536UL 00455 #define OPT_CENTERX 512UL 00456 #define OPT_CENTERY 1024UL 00457 #define OPT_FLAT 256UL 00458 #define OPT_FULLSCREEN 8UL 00459 #define OPT_MEDIAFIFO 16UL 00460 #define OPT_RGB565 0UL 00461 #define OPT_MONO 1UL 00462 #define OPT_NOBACK 4096UL 00463 #define OPT_NODL 2UL 00464 #define OPT_NOHANDS 49152UL 00465 #define OPT_NOHM 16384UL 00466 #define OPT_NOPOINTER 16384UL 00467 #define OPT_NOSECS 32768UL 00468 #define OPT_NOTEAR 4UL 00469 #define OPT_NOTICKS 8192UL 00470 #define OPT_RIGHTX 2048UL 00471 #define OPT_SIGNED 256UL 00472 #define OPT_SOUND 32UL 00473 #define PALETTED 8UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00474 #define PALETTED4444 15UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00475 #define PALETTED565 14UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00476 #define PALETTED8 16UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00477 #define POINTS 2UL 00478 #define FTPOINTS 2UL 00479 #define RAM_CMD 3178496UL // 0x30 8000 00480 #define RAM_DL 3145728UL // 0x30 0000 00481 #define RAM_G 0UL 00482 #define RAM_REG 3153920UL // 0x30 2000 00483 #define RAM_ROMSUB 3186688UL // 0x30 A000 00484 #define RAM_SCREENSHOT 3940352UL // 0x3C 2000 (not documented!) 00485 #define RECTS 9UL 00486 00487 #define ROMFONT_TABLEADDRESS 3145724UL 00488 00489 #define REG_ANALOG 3154284UL 00490 #define REG_ANA_COMP 3154308UL 00491 #define REG_BIST_EN 3154292UL 00492 #define REG_BUSYBITS 3154152UL 00493 #define REG_CLOCK 3153928UL 00494 #define REG_CMDB_SPACE 3155316UL 00495 #define REG_CMDB_WRITE 3155320UL 00496 #define REG_CMD_DL 3154176UL 00497 #define REG_CMD_READ 3154168UL 00498 #define REG_CMD_WRITE 3154172UL 00499 #define REG_CPURESET 3153952UL 00500 #define REG_CRC 3154296UL 00501 #define REG_CSPREAD 3154024UL 00502 #define REG_CTOUCH_EXTENDED 3154184UL 00503 //modified below to reflect the same as datasheet 00504 #define REG_CTOUCH_TOUCH0_XY 3154212UL 00505 #define REG_CTOUCH_TOUCH4_X 3154284UL 00506 #define REG_CTOUCH_TOUCH4_Y 3154208UL 00507 #define REG_CTOUCH_TOUCH1_XY 3154204UL 00508 #define REG_CTOUCH_TOUCH2_XY 3154316UL 00509 #define REG_CTOUCH_TOUCH3_XY 3154320UL 00510 #define REG_CYA_TOUCH 3154280UL 00511 #define REG_DATESTAMP 3155300UL 00512 #define REG_DITHER 3154016UL 00513 #define REG_DLSWAP 3154004UL 00514 #define REG_FRAMES 3153924UL 00515 #define REG_FREQUENCY 3153932UL 00516 #define REG_GPIO 3154068UL 00517 #define REG_GPIOX 3154076UL 00518 #define REG_GPIOX_DIR 3154072UL 00519 #define REG_GPIO_DIR 3154064UL 00520 #define REG_HCYCLE 3153964UL 00521 #define REG_HOFFSET 3153968UL 00522 #define REG_HSIZE 3153972UL 00523 #define REG_HSYNC0 3153976UL 00524 #define REG_HSYNC1 3153980UL 00525 #define REG_ID 3153920UL 00526 #define REG_INT_EN 3154092UL 00527 #define REG_INT_FLAGS 3154088UL 00528 #define REG_INT_MASK 3154096UL 00529 #define REG_MACRO_0 3154136UL 00530 #define REG_MACRO_1 3154140UL 00531 #define REG_MEDIAFIFO_READ 3182612UL 00532 #define REG_MEDIAFIFO_WRITE 3182616UL 00533 #define REG_OUTBITS 3154012UL 00534 #define REG_PATCHED_ANALOG 3154288UL 00535 #define REG_PATCHED_TOUCH_FAULT 3154284UL 00536 #define REG_PCLK 3154032UL 00537 #define REG_PCLK_POL 3154028UL 00538 #define REG_PLAY 3154060UL 00539 #define REG_PLAYBACK_FORMAT 3154116UL 00540 #define REG_PLAYBACK_FREQ 3154112UL 00541 #define REG_PLAYBACK_LENGTH 3154104UL 00542 #define REG_PLAYBACK_LOOP 3154120UL 00543 #define REG_PLAYBACK_PLAY 3154124UL 00544 #define REG_PLAYBACK_READPTR 3154108UL 00545 #define REG_PLAYBACK_START 3154100UL 00546 #define REG_PWM_DUTY 3154132UL 00547 #define REG_PWM_HZ 3154128UL 00548 #define REG_RENDERMODE 3153936UL 00549 #define REG_ROMSUB_SEL 3154160UL 00550 #define REG_ROTATE 3154008UL 00551 #define REG_SNAPFORMAT 3153948UL 00552 #define REG_SNAPSHOT 3153944UL 00553 #define REG_SNAPY 3153940UL 00554 #define REG_SOUND 3154056UL 00555 #define REG_SPI_EARLY_TX 3154300UL 00556 #define REG_SPI_WIDTH 3154312UL 00557 #define REG_SWIZZLE 3154020UL 00558 #define REG_TAG 3154044UL 00559 #define REG_TAG_X 3154036UL 00560 #define REG_TAG_Y 3154040UL 00561 #define REG_TAP_CRC 3153956UL 00562 #define REG_TAP_MASK 3153960UL 00563 #define REG_TOUCH_ADC_MODE 3154184UL 00564 #define REG_TOUCH_CHARGE 3154188UL 00565 #define REG_TOUCH_DIRECT_XY 3154316UL 00566 #define REG_TOUCH_DIRECT_Z1Z2 3154320UL 00567 #define REG_TOUCH_FAULT 3154288UL 00568 #define REG_TOUCH_MODE 3154180UL 00569 #define REG_TOUCH_OVERSAMPLE 3154196UL 00570 #define REG_TOUCH_RAW_XY 3154204UL 00571 #define REG_TOUCH_RZ 3154208UL 00572 #define REG_TOUCH_RZTHRESH 3154200UL 00573 #define REG_TOUCH_SCREEN_XY 3154212UL 00574 #define REG_TOUCH_SETTLE 3154192UL 00575 #define REG_TOUCH_TAG 3154220UL 00576 #define REG_TOUCH_TAG1 3154228UL 00577 #define REG_TOUCH_TAG1_XY 3154224UL 00578 #define REG_TOUCH_TAG2 3154236UL 00579 #define REG_TOUCH_TAG2_XY 3154232UL 00580 #define REG_TOUCH_TAG3 3154244UL 00581 #define REG_TOUCH_TAG3_XY 3154240UL 00582 #define REG_TOUCH_TAG4 3154252UL 00583 #define REG_TOUCH_TAG4_XY 3154248UL 00584 #define REG_TOUCH_TAG_XY 3154216UL 00585 #define REG_TOUCH_TRANSFORM_A 3154256UL 00586 #define REG_TOUCH_TRANSFORM_B 3154260UL 00587 #define REG_TOUCH_TRANSFORM_C 3154264UL 00588 #define REG_TOUCH_TRANSFORM_D 3154268UL 00589 #define REG_TOUCH_TRANSFORM_E 3154272UL 00590 #define REG_TOUCH_TRANSFORM_F 3154276UL 00591 #define REG_TRACKER 3182592UL 00592 #define REG_TRACKER_1 3182596UL 00593 #define REG_TRACKER_2 3182600UL 00594 #define REG_TRACKER_3 3182604UL 00595 #define REG_TRACKER_4 3182608UL 00596 #define REG_TRIM 3154304UL 00597 #define REG_VCYCLE 3153984UL 00598 #define REG_VOFFSET 3153988UL 00599 #define REG_VOL_PB 3154048UL 00600 #define REG_VOL_SOUND 3154052UL 00601 #define REG_VSIZE 3153992UL 00602 #define REG_VSYNC0 3153996UL 00603 #define REG_VSYNC1 3154000UL 00604 00605 #define REG_TOUCH_CONFIG 3154280UL // Jack 00606 #define VAL_TOUCH_CONFIG 0x0381 00607 #define REPEAT 1UL 00608 #define REPLACE 2UL 00609 #define RGB332 4UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00610 #define RGB565 7UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00611 #define SRC_ALPHA 2UL 00612 #define TEXT8X8 9UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00613 #define TEXTVGA 10UL // 0 ARGB1555, 1 L1, 2 L4, 3 L8, 4 RGB332, 5 ARGB2, 6 ARGB4, 7 RGB565, 8 PALETTED, 9 TEXT8X8, 10 TEXTVGA, 11 BARGRAPH 00614 #define TOUCHMODE_CONTINUOUS 3UL 00615 #define TOUCHMODE_FRAME 2UL 00616 #define TOUCHMODE_OFF 0UL 00617 #define TOUCHMODE_ONESHOT 1UL 00618 #define ULAW_SAMPLES 1UL 00619 #define ZERO 0UL 00620 #define VERTEX2F(x,y) ((1UL<<30)|(((x)&32767UL)<<15)|(((y)&32767UL)<<0)) 00621 #define VERTEX2II(x,y,handle,cell) ((2UL<<30)|(((x)&511UL)<<21)|(((y)&511UL)<<12)|(((handle)&31UL)<<7)|(((cell)&127UL)<<0)) 00622 #define BITMAP_SOURCE(addr) ((1UL<<24)|(((addr)&4194303UL)<<0)) 00623 #define CLEAR_COLOR_RGB(red,green,blue) ((2UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0)) 00624 #define TAG(s) ((3UL<<24)|(((s)&255UL)<<0)) 00625 #define COLOR_RGB(red,green,blue) ((4UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0)) 00626 #define BITMAP_HANDLE(handle) ((5UL<<24)|(((handle)&31UL)<<0)) 00627 #define CELL(cell) ((6UL<<24)|(((cell)&127UL)<<0)) 00628 #define BITMAP_LAYOUT(format,linestride,height) ((7UL<<24)|(((format)&31UL)<<19)|(((linestride)&1023UL)<<9)|(((height)&511UL)<<0)) 00629 #define BITMAP_LAYOUT_H(linestride,height) ((40UL<<24)|(((linestride)&3UL)<<2)|(((height)&3UL)<<0)) 00630 #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)) 00631 #define BITMAP_SIZE_H(width,height) ((41UL<<24)|(((width)&3UL)<<2)|(((height)&3UL)<<0)) 00632 #define ALPHA_FUNC(func,ref) ((9UL<<24)|(((func)&7UL)<<8)|(((ref)&255UL)<<0)) 00633 #define STENCIL_FUNC(func,ref,mask) ((10UL<<24)|(((func)&7UL)<<16)|(((ref)&255UL)<<8)|(((mask)&255UL)<<0)) 00634 #define BLEND_FUNC(src,dst) ((11UL<<24)|(((src)&7UL)<<3)|(((dst)&7UL)<<0)) 00635 #define STENCIL_OP(sfail,spass) ((12UL<<24)|(((sfail)&7UL)<<3)|(((spass)&7UL)<<0)) 00636 #define POINT_SIZE(size) ((13UL<<24)|(((size)&8191UL)<<0)) 00637 #define LINE_WIDTH(width) ((14UL<<24)|(((width)&4095UL)<<0)) 00638 #define CLEAR_COLOR_A(alpha) ((15UL<<24)|(((alpha)&255UL)<<0)) 00639 #define COLOR_A(alpha) ((16UL<<24)|(((alpha)&255UL)<<0)) 00640 #define CLEAR_STENCIL(s) ((17UL<<24)|(((s)&255UL)<<0)) 00641 #define CLEAR_TAG(s) ((18UL<<24)|(((s)&255UL)<<0)) 00642 #define STENCIL_MASK(mask) ((19UL<<24)|(((mask)&255UL)<<0)) 00643 #define TAG_MASK(mask) ((20UL<<24)|(((mask)&1UL)<<0)) 00644 #define BITMAP_TRANSFORM_A(a) ((21UL<<24)|(((a)&131071UL)<<0)) 00645 #define BITMAP_TRANSFORM_B(b) ((22UL<<24)|(((b)&131071UL)<<0)) 00646 #define BITMAP_TRANSFORM_C(c) ((23UL<<24)|(((c)&16777215UL)<<0)) 00647 #define BITMAP_TRANSFORM_D(d) ((24UL<<24)|(((d)&131071UL)<<0)) 00648 #define BITMAP_TRANSFORM_E(e) ((25UL<<24)|(((e)&131071UL)<<0)) 00649 #define BITMAP_TRANSFORM_F(f) ((26UL<<24)|(((f)&16777215UL)<<0)) 00650 #define SCISSOR_XY(x,y) ((27UL<<24)|(((x)&2047UL)<<11)|(((y)&2047UL)<<0)) 00651 #define SCISSOR_SIZE(width,height) ((28UL<<24)|(((width)&4095UL)<<12)|(((height)&4095UL)<<0)) 00652 #define CALL(dest) ((29UL<<24)|(((dest)&65535UL)<<0)) 00653 #define JUMP(dest) ((30UL<<24)|(((dest)&65535UL)<<0)) 00654 #define BEGIN(prim) ((31UL<<24)|(((prim)&15UL)<<0)) 00655 #define COLOR_MASK(r,g,b,a) ((32UL<<24)|(((r)&1UL)<<3)|(((g)&1UL)<<2)|(((b)&1UL)<<1)|(((a)&1UL)<<0)) 00656 #define CLEAR(c,s,t) ((38UL<<24)|(((c)&1UL)<<2)|(((s)&1UL)<<1)|(((t)&1UL)<<0)) 00657 #define VERTEX_FORMAT(frac) ((39UL<<24)|(((frac)&7UL)<<0)) 00658 #define PALETTE_SOURCE(addr) ((42UL<<24)|(((addr)&4194303UL)<<0)) 00659 #define VERTEX_TRANSLATE_X(x) ((43UL<<24)|(((x)&131071UL)<<0)) 00660 #define VERTEX_TRANSLATE_Y(y) ((44UL<<24)|(((y)&131071UL)<<0)) 00661 #define NOP() ((45UL<<24)) 00662 #define END() ((33UL<<24)) 00663 #define SAVE_CONTEXT() ((34UL<<24)) 00664 #define RESTORE_CONTEXT() ((35UL<<24)) 00665 #define RETURN() ((36UL<<24)) 00666 #define MACRO(m) ((37UL<<24)|(((m)&1UL)<<0)) 00667 #define DISPLAY() ((0UL<<24)) 00668 #endif 00669 00670 #define FT_GPU_NUMCHAR_PERFONT (128) 00671 #define FT_GPU_FONT_TABLE_SIZE (148) 00672 00673 /* FT81x and FT80x font table structure */ 00674 /* Font table address in ROM can be found by reading the address from 0xFFFFC location. */ 00675 /* 16 font tables are present at the address read from location 0xFFFFC */ 00676 typedef struct FT_Gpu_Fonts 00677 { 00678 /* All the values are in bytes */ 00679 /* Width of each character font from 0 to 127 */ 00680 ft_uint8_t FontWidth[FT_GPU_NUMCHAR_PERFONT]; 00681 /* Bitmap format of font wrt bitmap formats supported by FT800 - L1, L4, L8 */ 00682 ft_uint32_t FontBitmapFormat; 00683 /* Font line stride in FT800 ROM */ 00684 ft_uint32_t FontLineStride; 00685 /* Font width in pixels */ 00686 ft_uint32_t FontWidthInPixels; 00687 /* Font height in pixels */ 00688 ft_uint32_t FontHeightInPixels; 00689 /* Pointer to font graphics raw data */ 00690 ft_uint32_t PointerToFontGraphicsData; 00691 }FT_Gpu_Fonts_t; 00692 00693 /* Nothing beyond this */
Generated on Tue Jul 19 2022 11:45:29 by
1.7.2
