updated for FT810 and 800x480 display
Dependents: FT810_RGB_demo FT81x_TripComp_test FT810_LoadJPG
Fork of FT800_2 by
FT_Gpu.h@7:a69ac4d39afd, 2016-02-24 (annotated)
- Committer:
- davidchilds
- Date:
- Wed Feb 24 14:04:34 2016 +0000
- Revision:
- 7:a69ac4d39afd
- Parent:
- 2:ab74a9a05970
The updated library for FT810 with 800x480 display; Thanks to FTDI and Peter Drescher for getting this far
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
davidchilds | 7:a69ac4d39afd | 1 | /* |
davidchilds | 7:a69ac4d39afd | 2 | |
davidchilds | 7:a69ac4d39afd | 3 | Copyright (c) Future Technology Devices International 2014 |
davidchilds | 7:a69ac4d39afd | 4 | |
davidchilds | 7:a69ac4d39afd | 5 | THIS SOFTWARE IS PROVIDED BY FUTURE TECHNOLOGY DEVICES INTERNATIONAL LIMITED "AS IS" |
davidchilds | 7:a69ac4d39afd | 6 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
davidchilds | 7:a69ac4d39afd | 7 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL |
davidchilds | 7:a69ac4d39afd | 8 | FUTURE TECHNOLOGY DEVICES INTERNATIONAL LIMITED BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
davidchilds | 7:a69ac4d39afd | 9 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT |
davidchilds | 7:a69ac4d39afd | 10 | OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION) |
davidchilds | 7:a69ac4d39afd | 11 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR |
davidchilds | 7:a69ac4d39afd | 12 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |
davidchilds | 7:a69ac4d39afd | 13 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
davidchilds | 7:a69ac4d39afd | 14 | |
davidchilds | 7:a69ac4d39afd | 15 | FTDI DRIVERS MAY BE USED ONLY IN CONJUNCTION WITH PRODUCTS BASED ON FTDI PARTS. |
davidchilds | 7:a69ac4d39afd | 16 | |
davidchilds | 7:a69ac4d39afd | 17 | FTDI DRIVERS MAY BE DISTRIBUTED IN ANY FORM AS LONG AS LICENSE INFORMATION IS NOT MODIFIED. |
davidchilds | 7:a69ac4d39afd | 18 | |
davidchilds | 7:a69ac4d39afd | 19 | IF A CUSTOM VENDOR ID AND/OR PRODUCT ID OR DESCRIPTION STRING ARE USED, IT IS THE |
davidchilds | 7:a69ac4d39afd | 20 | RESPONSIBILITY OF THE PRODUCT MANUFACTURER TO MAINTAIN ANY CHANGES AND SUBSEQUENT WHQL |
davidchilds | 7:a69ac4d39afd | 21 | RE-CERTIFICATION AS A RESULT OF MAKING THESE CHANGES. |
davidchilds | 7:a69ac4d39afd | 22 | |
davidchilds | 7:a69ac4d39afd | 23 | Author : FTDI |
davidchilds | 7:a69ac4d39afd | 24 | |
davidchilds | 7:a69ac4d39afd | 25 | Revision History: |
davidchilds | 7:a69ac4d39afd | 26 | 0.1 - date 2013.04.24 - Initial Version |
davidchilds | 7:a69ac4d39afd | 27 | 0.2 - date 2013.08.19 - added few registers. |
davidchilds | 7:a69ac4d39afd | 28 | 1.0 - date 2013.12.10 - Version 1.0. |
davidchilds | 7:a69ac4d39afd | 29 | 2.0 - date 2014.11.24 - version 2.0 which includes support for FT81x series. |
davidchilds | 7:a69ac4d39afd | 30 | |
davidchilds | 7:a69ac4d39afd | 31 | |
davidchilds | 7:a69ac4d39afd | 32 | */ |
dreschpe | 2:ab74a9a05970 | 33 | |
dreschpe | 0:5e013296b353 | 34 | #ifndef _FT_GPU_H_ |
dreschpe | 0:5e013296b353 | 35 | #define _FT_GPU_H_ |
dreschpe | 0:5e013296b353 | 36 | |
dreschpe | 0:5e013296b353 | 37 | /* Definitions used for FT800 co processor command buffer */ |
davidchilds | 7:a69ac4d39afd | 38 | #define FT_DL_SIZE (8*1024L) //8KB Display List buffer size |
davidchilds | 7:a69ac4d39afd | 39 | #define FT_CMD_FIFO_SIZE (4*1024L) //4KB coprocessor Fifo size |
dreschpe | 0:5e013296b353 | 40 | #define FT_CMD_SIZE (4) //4 byte per coprocessor command of EVE |
dreschpe | 0:5e013296b353 | 41 | |
davidchilds | 7:a69ac4d39afd | 42 | |
davidchilds | 7:a69ac4d39afd | 43 | /* For FT801, FT811 and FT813 */ |
davidchilds | 7:a69ac4d39afd | 44 | #define CTOUCH_MODE_COMPATIBILITY 1 |
davidchilds | 7:a69ac4d39afd | 45 | #define CTOUCH_MODE_EXTENDED 0 |
davidchilds | 7:a69ac4d39afd | 46 | |
davidchilds | 7:a69ac4d39afd | 47 | #define LOW_FREQ_BOUND 58800000L//98% of 60Mhz |
davidchilds | 7:a69ac4d39afd | 48 | |
davidchilds | 7:a69ac4d39afd | 49 | #define RAM_G_SIZE 1024*1024L |
davidchilds | 7:a69ac4d39afd | 50 | #define FT81X_VERSION "1.0.4" |
davidchilds | 7:a69ac4d39afd | 51 | |
dreschpe | 0:5e013296b353 | 52 | #define ADC_DIFFERENTIAL 1UL |
dreschpe | 0:5e013296b353 | 53 | #define ADC_SINGLE_ENDED 0UL |
dreschpe | 0:5e013296b353 | 54 | #define ADPCM_SAMPLES 2UL |
dreschpe | 0:5e013296b353 | 55 | #define ALWAYS 7UL |
dreschpe | 0:5e013296b353 | 56 | #define ARGB1555 0UL |
dreschpe | 0:5e013296b353 | 57 | #define ARGB2 5UL |
dreschpe | 0:5e013296b353 | 58 | #define ARGB4 6UL |
dreschpe | 0:5e013296b353 | 59 | #define BARGRAPH 11UL |
dreschpe | 0:5e013296b353 | 60 | #define BILINEAR 1UL |
dreschpe | 0:5e013296b353 | 61 | #define BITMAPS 1UL |
dreschpe | 0:5e013296b353 | 62 | #define BORDER 0UL |
dreschpe | 0:5e013296b353 | 63 | #define CMDBUF_SIZE 4096UL |
dreschpe | 0:5e013296b353 | 64 | #define CMD_APPEND 4294967070UL |
dreschpe | 0:5e013296b353 | 65 | #define CMD_BGCOLOR 4294967049UL |
dreschpe | 0:5e013296b353 | 66 | #define CMD_BITMAP_TRANSFORM 4294967073UL |
dreschpe | 0:5e013296b353 | 67 | #define CMD_BUTTON 4294967053UL |
dreschpe | 0:5e013296b353 | 68 | #define CMD_CALIBRATE 4294967061UL |
dreschpe | 0:5e013296b353 | 69 | #define CMD_CLOCK 4294967060UL |
dreschpe | 0:5e013296b353 | 70 | #define CMD_COLDSTART 4294967090UL |
dreschpe | 0:5e013296b353 | 71 | #define CMD_CRC 4294967043UL |
davidchilds | 7:a69ac4d39afd | 72 | #define CMD_CSKETCH 4294967093UL |
dreschpe | 0:5e013296b353 | 73 | #define CMD_DIAL 4294967085UL |
dreschpe | 0:5e013296b353 | 74 | #define CMD_DLSTART 4294967040UL |
dreschpe | 0:5e013296b353 | 75 | #define CMD_EXECUTE 4294967047UL |
dreschpe | 0:5e013296b353 | 76 | #define CMD_FGCOLOR 4294967050UL |
dreschpe | 0:5e013296b353 | 77 | #define CMD_GAUGE 4294967059UL |
dreschpe | 0:5e013296b353 | 78 | #define CMD_GETMATRIX 4294967091UL |
dreschpe | 0:5e013296b353 | 79 | #define CMD_GETPOINT 4294967048UL |
dreschpe | 0:5e013296b353 | 80 | #define CMD_GETPROPS 4294967077UL |
dreschpe | 0:5e013296b353 | 81 | #define CMD_GETPTR 4294967075UL |
dreschpe | 0:5e013296b353 | 82 | #define CMD_GRADCOLOR 4294967092UL |
dreschpe | 0:5e013296b353 | 83 | #define CMD_GRADIENT 4294967051UL |
dreschpe | 0:5e013296b353 | 84 | #define CMD_HAMMERAUX 4294967044UL |
davidchilds | 7:a69ac4d39afd | 85 | #define CMD_IDCT_DELETED 4294967046UL |
dreschpe | 0:5e013296b353 | 86 | #define CMD_INFLATE 4294967074UL |
dreschpe | 0:5e013296b353 | 87 | #define CMD_INTERRUPT 4294967042UL |
davidchilds | 7:a69ac4d39afd | 88 | #define CMD_INT_RAMSHARED 4294967101UL |
davidchilds | 7:a69ac4d39afd | 89 | #define CMD_INT_SWLOADIMAGE 4294967102UL |
dreschpe | 0:5e013296b353 | 90 | #define CMD_KEYS 4294967054UL |
dreschpe | 0:5e013296b353 | 91 | #define CMD_LOADIDENTITY 4294967078UL |
dreschpe | 0:5e013296b353 | 92 | #define CMD_LOADIMAGE 4294967076UL |
dreschpe | 0:5e013296b353 | 93 | #define CMD_LOGO 4294967089UL |
dreschpe | 0:5e013296b353 | 94 | #define CMD_MARCH 4294967045UL |
davidchilds | 7:a69ac4d39afd | 95 | #define CMD_MEDIAFIFO 4294967097UL |
dreschpe | 0:5e013296b353 | 96 | #define CMD_MEMCPY 4294967069UL |
dreschpe | 0:5e013296b353 | 97 | #define CMD_MEMCRC 4294967064UL |
dreschpe | 0:5e013296b353 | 98 | #define CMD_MEMSET 4294967067UL |
dreschpe | 0:5e013296b353 | 99 | #define CMD_MEMWRITE 4294967066UL |
dreschpe | 0:5e013296b353 | 100 | #define CMD_MEMZERO 4294967068UL |
dreschpe | 0:5e013296b353 | 101 | #define CMD_NUMBER 4294967086UL |
davidchilds | 7:a69ac4d39afd | 102 | #define CMD_PLAYVIDEO 4294967098UL |
dreschpe | 0:5e013296b353 | 103 | #define CMD_PROGRESS 4294967055UL |
dreschpe | 0:5e013296b353 | 104 | #define CMD_REGREAD 4294967065UL |
davidchilds | 7:a69ac4d39afd | 105 | #define CMD_ROMFONT 4294967103UL |
dreschpe | 0:5e013296b353 | 106 | #define CMD_ROTATE 4294967081UL |
dreschpe | 0:5e013296b353 | 107 | #define CMD_SCALE 4294967080UL |
dreschpe | 0:5e013296b353 | 108 | #define CMD_SCREENSAVER 4294967087UL |
dreschpe | 0:5e013296b353 | 109 | #define CMD_SCROLLBAR 4294967057UL |
davidchilds | 7:a69ac4d39afd | 110 | #define CMD_SETBASE 4294967096UL |
davidchilds | 7:a69ac4d39afd | 111 | #define CMD_SETBITMAP 4294967107UL |
dreschpe | 0:5e013296b353 | 112 | #define CMD_SETFONT 4294967083UL |
davidchilds | 7:a69ac4d39afd | 113 | #define CMD_SETFONT2 4294967099UL |
dreschpe | 0:5e013296b353 | 114 | #define CMD_SETMATRIX 4294967082UL |
davidchilds | 7:a69ac4d39afd | 115 | #define CMD_SETROTATE 4294967094UL |
davidchilds | 7:a69ac4d39afd | 116 | #define CMD_SETSCRATCH 4294967100UL |
dreschpe | 0:5e013296b353 | 117 | #define CMD_SKETCH 4294967088UL |
dreschpe | 0:5e013296b353 | 118 | #define CMD_SLIDER 4294967056UL |
dreschpe | 0:5e013296b353 | 119 | #define CMD_SNAPSHOT 4294967071UL |
davidchilds | 7:a69ac4d39afd | 120 | #define CMD_SNAPSHOT2 4294967095UL |
dreschpe | 0:5e013296b353 | 121 | #define CMD_SPINNER 4294967062UL |
dreschpe | 0:5e013296b353 | 122 | #define CMD_STOP 4294967063UL |
dreschpe | 0:5e013296b353 | 123 | #define CMD_SWAP 4294967041UL |
davidchilds | 7:a69ac4d39afd | 124 | #define CMD_SYNC 4294967106UL |
dreschpe | 0:5e013296b353 | 125 | #define CMD_TEXT 4294967052UL |
dreschpe | 0:5e013296b353 | 126 | #define CMD_TOGGLE 4294967058UL |
dreschpe | 0:5e013296b353 | 127 | #define CMD_TOUCH_TRANSFORM 4294967072UL |
dreschpe | 0:5e013296b353 | 128 | #define CMD_TRACK 4294967084UL |
dreschpe | 0:5e013296b353 | 129 | #define CMD_TRANSLATE 4294967079UL |
davidchilds | 7:a69ac4d39afd | 130 | #define CMD_VIDEOFRAME 4294967105UL |
davidchilds | 7:a69ac4d39afd | 131 | #define CMD_VIDEOSTART 4294967104UL |
dreschpe | 0:5e013296b353 | 132 | #define DECR 4UL |
dreschpe | 0:5e013296b353 | 133 | #define DLSWAP_DONE 0UL |
dreschpe | 0:5e013296b353 | 134 | #define DLSWAP_FRAME 2UL |
dreschpe | 0:5e013296b353 | 135 | #define DLSWAP_LINE 1UL |
dreschpe | 0:5e013296b353 | 136 | #define DST_ALPHA 3UL |
dreschpe | 0:5e013296b353 | 137 | #define EDGE_STRIP_A 7UL |
dreschpe | 0:5e013296b353 | 138 | #define EDGE_STRIP_B 8UL |
dreschpe | 0:5e013296b353 | 139 | #define EDGE_STRIP_L 6UL |
dreschpe | 0:5e013296b353 | 140 | #define EDGE_STRIP_R 5UL |
dreschpe | 0:5e013296b353 | 141 | #define EQUAL 5UL |
dreschpe | 0:5e013296b353 | 142 | #define GEQUAL 4UL |
dreschpe | 0:5e013296b353 | 143 | #define GREATER 3UL |
dreschpe | 0:5e013296b353 | 144 | #define INCR 3UL |
dreschpe | 0:5e013296b353 | 145 | #define INT_CMDEMPTY 32UL |
dreschpe | 0:5e013296b353 | 146 | #define INT_CMDFLAG 64UL |
dreschpe | 0:5e013296b353 | 147 | #define INT_CONVCOMPLETE 128UL |
davidchilds | 7:a69ac4d39afd | 148 | #define INT_G8 18UL |
davidchilds | 7:a69ac4d39afd | 149 | #define INT_L8C 12UL |
dreschpe | 0:5e013296b353 | 150 | #define INT_PLAYBACK 16UL |
dreschpe | 0:5e013296b353 | 151 | #define INT_SOUND 8UL |
dreschpe | 0:5e013296b353 | 152 | #define INT_SWAP 1UL |
dreschpe | 0:5e013296b353 | 153 | #define INT_TAG 4UL |
dreschpe | 0:5e013296b353 | 154 | #define INT_TOUCH 2UL |
davidchilds | 7:a69ac4d39afd | 155 | #define INT_VGA 13UL |
dreschpe | 0:5e013296b353 | 156 | #define INVERT 5UL |
dreschpe | 0:5e013296b353 | 157 | #define KEEP 1UL |
dreschpe | 0:5e013296b353 | 158 | #define L1 1UL |
davidchilds | 7:a69ac4d39afd | 159 | #define L2 17UL |
dreschpe | 0:5e013296b353 | 160 | #define L4 2UL |
dreschpe | 0:5e013296b353 | 161 | #define L8 3UL |
dreschpe | 0:5e013296b353 | 162 | #define LEQUAL 2UL |
dreschpe | 0:5e013296b353 | 163 | #define LESS 1UL |
dreschpe | 0:5e013296b353 | 164 | #define LINEAR_SAMPLES 0UL |
dreschpe | 0:5e013296b353 | 165 | #define LINES 3UL |
dreschpe | 0:5e013296b353 | 166 | #define LINE_STRIP 4UL |
dreschpe | 0:5e013296b353 | 167 | #define NEAREST 0UL |
dreschpe | 0:5e013296b353 | 168 | #define NEVER 0UL |
dreschpe | 0:5e013296b353 | 169 | #define NOTEQUAL 6UL |
dreschpe | 0:5e013296b353 | 170 | #define ONE 1UL |
dreschpe | 0:5e013296b353 | 171 | #define ONE_MINUS_DST_ALPHA 5UL |
dreschpe | 0:5e013296b353 | 172 | #define ONE_MINUS_SRC_ALPHA 4UL |
dreschpe | 0:5e013296b353 | 173 | #define OPT_CENTER 1536UL |
dreschpe | 0:5e013296b353 | 174 | #define OPT_CENTERX 512UL |
dreschpe | 0:5e013296b353 | 175 | #define OPT_CENTERY 1024UL |
dreschpe | 0:5e013296b353 | 176 | #define OPT_FLAT 256UL |
davidchilds | 7:a69ac4d39afd | 177 | #define OPT_FULLSCREEN 8UL |
davidchilds | 7:a69ac4d39afd | 178 | #define OPT_MEDIAFIFO 16UL |
dreschpe | 0:5e013296b353 | 179 | #define OPT_MONO 1UL |
dreschpe | 0:5e013296b353 | 180 | #define OPT_NOBACK 4096UL |
dreschpe | 0:5e013296b353 | 181 | #define OPT_NODL 2UL |
dreschpe | 0:5e013296b353 | 182 | #define OPT_NOHANDS 49152UL |
dreschpe | 0:5e013296b353 | 183 | #define OPT_NOHM 16384UL |
dreschpe | 0:5e013296b353 | 184 | #define OPT_NOPOINTER 16384UL |
dreschpe | 0:5e013296b353 | 185 | #define OPT_NOSECS 32768UL |
davidchilds | 7:a69ac4d39afd | 186 | #define OPT_NOTEAR 4UL |
dreschpe | 0:5e013296b353 | 187 | #define OPT_NOTICKS 8192UL |
dreschpe | 0:5e013296b353 | 188 | #define OPT_RIGHTX 2048UL |
dreschpe | 0:5e013296b353 | 189 | #define OPT_SIGNED 256UL |
davidchilds | 7:a69ac4d39afd | 190 | #define OPT_SOUND 32UL |
dreschpe | 0:5e013296b353 | 191 | #define PALETTED 8UL |
davidchilds | 7:a69ac4d39afd | 192 | #define PALETTED4444 15UL |
davidchilds | 7:a69ac4d39afd | 193 | #define PALETTED565 14UL |
davidchilds | 7:a69ac4d39afd | 194 | #define PALETTED8 16UL |
dreschpe | 0:5e013296b353 | 195 | #define FTPOINTS 2UL |
davidchilds | 7:a69ac4d39afd | 196 | #define RAM_CMD 3178496UL |
davidchilds | 7:a69ac4d39afd | 197 | #define RAM_DL 3145728UL |
davidchilds | 7:a69ac4d39afd | 198 | #define RAM_G 0UL |
davidchilds | 7:a69ac4d39afd | 199 | #define RAM_REG 3153920UL |
davidchilds | 7:a69ac4d39afd | 200 | #define RAM_ROMSUB 3186688UL |
dreschpe | 0:5e013296b353 | 201 | #define RECTS 9UL |
dreschpe | 0:5e013296b353 | 202 | |
davidchilds | 7:a69ac4d39afd | 203 | #define ROMFONT_TABLEADDRESS 3145724UL |
dreschpe | 0:5e013296b353 | 204 | |
davidchilds | 7:a69ac4d39afd | 205 | #define REG_ANALOG 3154284UL |
davidchilds | 7:a69ac4d39afd | 206 | #define REG_ANA_COMP 3154308UL |
davidchilds | 7:a69ac4d39afd | 207 | #define REG_BIST_EN 3154292UL |
davidchilds | 7:a69ac4d39afd | 208 | #define REG_BUSYBITS 3154152UL |
davidchilds | 7:a69ac4d39afd | 209 | #define REG_CLOCK 3153928UL |
davidchilds | 7:a69ac4d39afd | 210 | #define REG_CMDB_SPACE 3155316UL |
davidchilds | 7:a69ac4d39afd | 211 | #define REG_CMDB_WRITE 3155320UL |
davidchilds | 7:a69ac4d39afd | 212 | #define REG_CMD_DL 3154176UL |
davidchilds | 7:a69ac4d39afd | 213 | #define REG_CMD_READ 3154168UL |
davidchilds | 7:a69ac4d39afd | 214 | #define REG_CMD_WRITE 3154172UL |
davidchilds | 7:a69ac4d39afd | 215 | #define REG_CPURESET 3153952UL |
davidchilds | 7:a69ac4d39afd | 216 | #define REG_CRC 3154296UL |
davidchilds | 7:a69ac4d39afd | 217 | #define REG_CSPREAD 3154024UL |
davidchilds | 7:a69ac4d39afd | 218 | #define REG_CTOUCH_EXTENDED 3154184UL |
davidchilds | 7:a69ac4d39afd | 219 | //modified below to reflect the same as datasheet |
davidchilds | 7:a69ac4d39afd | 220 | #define REG_CTOUCH_TOUCH0_XY 3154212UL |
davidchilds | 7:a69ac4d39afd | 221 | #define REG_CTOUCH_TOUCH4_X 3154284UL |
davidchilds | 7:a69ac4d39afd | 222 | #define REG_CTOUCH_TOUCH4_Y 3154208UL |
davidchilds | 7:a69ac4d39afd | 223 | #define REG_CTOUCH_TOUCH1_XY 3154204UL |
davidchilds | 7:a69ac4d39afd | 224 | #define REG_CTOUCH_TOUCH2_XY 3154316UL |
davidchilds | 7:a69ac4d39afd | 225 | #define REG_CTOUCH_TOUCH3_XY 3154320UL |
davidchilds | 7:a69ac4d39afd | 226 | #define REG_CYA_TOUCH 3154280UL |
davidchilds | 7:a69ac4d39afd | 227 | #define REG_DATESTAMP 3155300UL |
davidchilds | 7:a69ac4d39afd | 228 | #define REG_DITHER 3154016UL |
davidchilds | 7:a69ac4d39afd | 229 | #define REG_DLSWAP 3154004UL |
davidchilds | 7:a69ac4d39afd | 230 | #define REG_FRAMES 3153924UL |
davidchilds | 7:a69ac4d39afd | 231 | #define REG_FREQUENCY 3153932UL |
davidchilds | 7:a69ac4d39afd | 232 | #define REG_GPIO 3154068UL |
davidchilds | 7:a69ac4d39afd | 233 | #define REG_GPIOX 3154076UL |
davidchilds | 7:a69ac4d39afd | 234 | #define REG_GPIOX_DIR 3154072UL |
davidchilds | 7:a69ac4d39afd | 235 | #define REG_GPIO_DIR 3154064UL |
davidchilds | 7:a69ac4d39afd | 236 | #define REG_HCYCLE 3153964UL |
davidchilds | 7:a69ac4d39afd | 237 | #define REG_HOFFSET 3153968UL |
davidchilds | 7:a69ac4d39afd | 238 | #define REG_HSIZE 3153972UL |
davidchilds | 7:a69ac4d39afd | 239 | #define REG_HSYNC0 3153976UL |
davidchilds | 7:a69ac4d39afd | 240 | #define REG_HSYNC1 3153980UL |
davidchilds | 7:a69ac4d39afd | 241 | #define REG_ID 3153920UL |
davidchilds | 7:a69ac4d39afd | 242 | #define REG_INT_EN 3154092UL |
davidchilds | 7:a69ac4d39afd | 243 | #define REG_INT_FLAGS 3154088UL |
davidchilds | 7:a69ac4d39afd | 244 | #define REG_INT_MASK 3154096UL |
davidchilds | 7:a69ac4d39afd | 245 | #define REG_MACRO_0 3154136UL |
davidchilds | 7:a69ac4d39afd | 246 | #define REG_MACRO_1 3154140UL |
davidchilds | 7:a69ac4d39afd | 247 | #define REG_MEDIAFIFO_READ 3182612UL |
davidchilds | 7:a69ac4d39afd | 248 | #define REG_MEDIAFIFO_WRITE 3182616UL |
davidchilds | 7:a69ac4d39afd | 249 | #define REG_OUTBITS 3154012UL |
davidchilds | 7:a69ac4d39afd | 250 | #define REG_PATCHED_ANALOG 3154288UL |
davidchilds | 7:a69ac4d39afd | 251 | #define REG_PATCHED_TOUCH_FAULT 3154284UL |
davidchilds | 7:a69ac4d39afd | 252 | #define REG_PCLK 3154032UL |
davidchilds | 7:a69ac4d39afd | 253 | #define REG_PCLK_POL 3154028UL |
davidchilds | 7:a69ac4d39afd | 254 | #define REG_PLAY 3154060UL |
davidchilds | 7:a69ac4d39afd | 255 | #define REG_PLAYBACK_FORMAT 3154116UL |
davidchilds | 7:a69ac4d39afd | 256 | #define REG_PLAYBACK_FREQ 3154112UL |
davidchilds | 7:a69ac4d39afd | 257 | #define REG_PLAYBACK_LENGTH 3154104UL |
davidchilds | 7:a69ac4d39afd | 258 | #define REG_PLAYBACK_LOOP 3154120UL |
davidchilds | 7:a69ac4d39afd | 259 | #define REG_PLAYBACK_PLAY 3154124UL |
davidchilds | 7:a69ac4d39afd | 260 | #define REG_PLAYBACK_READPTR 3154108UL |
davidchilds | 7:a69ac4d39afd | 261 | #define REG_PLAYBACK_START 3154100UL |
davidchilds | 7:a69ac4d39afd | 262 | #define REG_PWM_DUTY 3154132UL |
davidchilds | 7:a69ac4d39afd | 263 | #define REG_PWM_HZ 3154128UL |
davidchilds | 7:a69ac4d39afd | 264 | #define REG_RENDERMODE 3153936UL |
davidchilds | 7:a69ac4d39afd | 265 | #define REG_ROMSUB_SEL 3154160UL |
davidchilds | 7:a69ac4d39afd | 266 | #define REG_ROTATE 3154008UL |
davidchilds | 7:a69ac4d39afd | 267 | #define REG_SNAPFORMAT 3153948UL |
davidchilds | 7:a69ac4d39afd | 268 | #define REG_SNAPSHOT 3153944UL |
davidchilds | 7:a69ac4d39afd | 269 | #define REG_SNAPY 3153940UL |
davidchilds | 7:a69ac4d39afd | 270 | #define REG_SOUND 3154056UL |
davidchilds | 7:a69ac4d39afd | 271 | #define REG_SPI_EARLY_TX 3154300UL |
davidchilds | 7:a69ac4d39afd | 272 | #define REG_SPI_WIDTH 3154312UL |
davidchilds | 7:a69ac4d39afd | 273 | #define REG_SWIZZLE 3154020UL |
davidchilds | 7:a69ac4d39afd | 274 | #define REG_TAG 3154044UL |
davidchilds | 7:a69ac4d39afd | 275 | #define REG_TAG_X 3154036UL |
davidchilds | 7:a69ac4d39afd | 276 | #define REG_TAG_Y 3154040UL |
davidchilds | 7:a69ac4d39afd | 277 | #define REG_TAP_CRC 3153956UL |
davidchilds | 7:a69ac4d39afd | 278 | #define REG_TAP_MASK 3153960UL |
davidchilds | 7:a69ac4d39afd | 279 | #define REG_TOUCH_ADC_MODE 3154184UL |
davidchilds | 7:a69ac4d39afd | 280 | #define REG_TOUCH_CHARGE 3154188UL |
davidchilds | 7:a69ac4d39afd | 281 | #define REG_TOUCH_DIRECT_XY 3154316UL |
davidchilds | 7:a69ac4d39afd | 282 | #define REG_TOUCH_DIRECT_Z1Z2 3154320UL |
davidchilds | 7:a69ac4d39afd | 283 | #define REG_TOUCH_FAULT 3154288UL |
davidchilds | 7:a69ac4d39afd | 284 | #define REG_TOUCH_MODE 3154180UL |
davidchilds | 7:a69ac4d39afd | 285 | #define REG_TOUCH_OVERSAMPLE 3154196UL |
davidchilds | 7:a69ac4d39afd | 286 | #define REG_TOUCH_RAW_XY 3154204UL |
davidchilds | 7:a69ac4d39afd | 287 | #define REG_TOUCH_RZ 3154208UL |
davidchilds | 7:a69ac4d39afd | 288 | #define REG_TOUCH_RZTHRESH 3154200UL |
davidchilds | 7:a69ac4d39afd | 289 | #define REG_TOUCH_SCREEN_XY 3154212UL |
davidchilds | 7:a69ac4d39afd | 290 | #define REG_TOUCH_SETTLE 3154192UL |
davidchilds | 7:a69ac4d39afd | 291 | #define REG_TOUCH_TAG 3154220UL |
davidchilds | 7:a69ac4d39afd | 292 | #define REG_TOUCH_TAG1 3154228UL |
davidchilds | 7:a69ac4d39afd | 293 | #define REG_TOUCH_TAG1_XY 3154224UL |
davidchilds | 7:a69ac4d39afd | 294 | #define REG_TOUCH_TAG2 3154236UL |
davidchilds | 7:a69ac4d39afd | 295 | #define REG_TOUCH_TAG2_XY 3154232UL |
davidchilds | 7:a69ac4d39afd | 296 | #define REG_TOUCH_TAG3 3154244UL |
davidchilds | 7:a69ac4d39afd | 297 | #define REG_TOUCH_TAG3_XY 3154240UL |
davidchilds | 7:a69ac4d39afd | 298 | #define REG_TOUCH_TAG4 3154252UL |
davidchilds | 7:a69ac4d39afd | 299 | #define REG_TOUCH_TAG4_XY 3154248UL |
davidchilds | 7:a69ac4d39afd | 300 | #define REG_TOUCH_TAG_XY 3154216UL |
davidchilds | 7:a69ac4d39afd | 301 | #define REG_TOUCH_TRANSFORM_A 3154256UL |
davidchilds | 7:a69ac4d39afd | 302 | #define REG_TOUCH_TRANSFORM_B 3154260UL |
davidchilds | 7:a69ac4d39afd | 303 | #define REG_TOUCH_TRANSFORM_C 3154264UL |
davidchilds | 7:a69ac4d39afd | 304 | #define REG_TOUCH_TRANSFORM_D 3154268UL |
davidchilds | 7:a69ac4d39afd | 305 | #define REG_TOUCH_TRANSFORM_E 3154272UL |
davidchilds | 7:a69ac4d39afd | 306 | #define REG_TOUCH_TRANSFORM_F 3154276UL |
davidchilds | 7:a69ac4d39afd | 307 | #define REG_TRACKER 3182592UL |
davidchilds | 7:a69ac4d39afd | 308 | #define REG_TRACKER_1 3182596UL |
davidchilds | 7:a69ac4d39afd | 309 | #define REG_TRACKER_2 3182600UL |
davidchilds | 7:a69ac4d39afd | 310 | #define REG_TRACKER_3 3182604UL |
davidchilds | 7:a69ac4d39afd | 311 | #define REG_TRACKER_4 3182608UL |
davidchilds | 7:a69ac4d39afd | 312 | #define REG_TRIM 3154304UL |
davidchilds | 7:a69ac4d39afd | 313 | #define REG_VCYCLE 3153984UL |
davidchilds | 7:a69ac4d39afd | 314 | #define REG_VOFFSET 3153988UL |
davidchilds | 7:a69ac4d39afd | 315 | #define REG_VOL_PB 3154048UL |
davidchilds | 7:a69ac4d39afd | 316 | #define REG_VOL_SOUND 3154052UL |
davidchilds | 7:a69ac4d39afd | 317 | #define REG_VSIZE 3153992UL |
davidchilds | 7:a69ac4d39afd | 318 | #define REG_VSYNC0 3153996UL |
davidchilds | 7:a69ac4d39afd | 319 | #define REG_VSYNC1 3154000UL |
dreschpe | 0:5e013296b353 | 320 | #define REPEAT 1UL |
dreschpe | 0:5e013296b353 | 321 | #define REPLACE 2UL |
dreschpe | 0:5e013296b353 | 322 | #define RGB332 4UL |
dreschpe | 0:5e013296b353 | 323 | #define RGB565 7UL |
dreschpe | 0:5e013296b353 | 324 | #define SRC_ALPHA 2UL |
dreschpe | 0:5e013296b353 | 325 | #define TEXT8X8 9UL |
dreschpe | 0:5e013296b353 | 326 | #define TEXTVGA 10UL |
dreschpe | 0:5e013296b353 | 327 | #define TOUCHMODE_CONTINUOUS 3UL |
dreschpe | 0:5e013296b353 | 328 | #define TOUCHMODE_FRAME 2UL |
dreschpe | 0:5e013296b353 | 329 | #define TOUCHMODE_OFF 0UL |
dreschpe | 0:5e013296b353 | 330 | #define TOUCHMODE_ONESHOT 1UL |
dreschpe | 0:5e013296b353 | 331 | #define ULAW_SAMPLES 1UL |
dreschpe | 0:5e013296b353 | 332 | #define ZERO 0UL |
dreschpe | 0:5e013296b353 | 333 | #define VERTEX2F(x,y) ((1UL<<30)|(((x)&32767UL)<<15)|(((y)&32767UL)<<0)) |
dreschpe | 0:5e013296b353 | 334 | #define VERTEX2II(x,y,handle,cell) ((2UL<<30)|(((x)&511UL)<<21)|(((y)&511UL)<<12)|(((handle)&31UL)<<7)|(((cell)&127UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 335 | #define BITMAP_SOURCE(addr) ((1UL<<24)|(((addr)&4194303UL)<<0)) |
dreschpe | 0:5e013296b353 | 336 | #define CLEAR_COLOR_RGB(red,green,blue) ((2UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 337 | #define TAG(s) ((3UL<<24)|(((s)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 338 | #define COLOR_RGB(red,green,blue) ((4UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 339 | #define BITMAP_HANDLE(handle) ((5UL<<24)|(((handle)&31UL)<<0)) |
dreschpe | 0:5e013296b353 | 340 | #define CELL(cell) ((6UL<<24)|(((cell)&127UL)<<0)) |
dreschpe | 0:5e013296b353 | 341 | #define BITMAP_LAYOUT(format,linestride,height) ((7UL<<24)|(((format)&31UL)<<19)|(((linestride)&1023UL)<<9)|(((height)&511UL)<<0)) |
dreschpe | 0:5e013296b353 | 342 | #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)) |
dreschpe | 0:5e013296b353 | 343 | #define ALPHA_FUNC(func,ref) ((9UL<<24)|(((func)&7UL)<<8)|(((ref)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 344 | #define STENCIL_FUNC(func,ref,mask) ((10UL<<24)|(((func)&7UL)<<16)|(((ref)&255UL)<<8)|(((mask)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 345 | #define BLEND_FUNC(src,dst) ((11UL<<24)|(((src)&7UL)<<3)|(((dst)&7UL)<<0)) |
dreschpe | 0:5e013296b353 | 346 | #define STENCIL_OP(sfail,spass) ((12UL<<24)|(((sfail)&7UL)<<3)|(((spass)&7UL)<<0)) |
dreschpe | 0:5e013296b353 | 347 | #define POINT_SIZE(size) ((13UL<<24)|(((size)&8191UL)<<0)) |
dreschpe | 0:5e013296b353 | 348 | #define LINE_WIDTH(width) ((14UL<<24)|(((width)&4095UL)<<0)) |
dreschpe | 0:5e013296b353 | 349 | #define CLEAR_COLOR_A(alpha) ((15UL<<24)|(((alpha)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 350 | #define COLOR_A(alpha) ((16UL<<24)|(((alpha)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 351 | #define CLEAR_STENCIL(s) ((17UL<<24)|(((s)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 352 | #define CLEAR_TAG(s) ((18UL<<24)|(((s)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 353 | #define STENCIL_MASK(mask) ((19UL<<24)|(((mask)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 354 | #define TAG_MASK(mask) ((20UL<<24)|(((mask)&1UL)<<0)) |
dreschpe | 0:5e013296b353 | 355 | #define BITMAP_TRANSFORM_A(a) ((21UL<<24)|(((a)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 356 | #define BITMAP_TRANSFORM_B(b) ((22UL<<24)|(((b)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 357 | #define BITMAP_TRANSFORM_C(c) ((23UL<<24)|(((c)&16777215UL)<<0)) |
dreschpe | 0:5e013296b353 | 358 | #define BITMAP_TRANSFORM_D(d) ((24UL<<24)|(((d)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 359 | #define BITMAP_TRANSFORM_E(e) ((25UL<<24)|(((e)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 360 | #define BITMAP_TRANSFORM_F(f) ((26UL<<24)|(((f)&16777215UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 361 | #define SCISSOR_XY(x,y) ((27UL<<24)|(((x)&2047UL)<<11)|(((y)&2047UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 362 | #define SCISSOR_SIZE(width,height) ((28UL<<24)|(((width)&4095UL)<<12)|(((height)&4095UL)<<0)) |
dreschpe | 0:5e013296b353 | 363 | #define CALL(dest) ((29UL<<24)|(((dest)&65535UL)<<0)) |
dreschpe | 0:5e013296b353 | 364 | #define JUMP(dest) ((30UL<<24)|(((dest)&65535UL)<<0)) |
dreschpe | 0:5e013296b353 | 365 | #define BEGIN(prim) ((31UL<<24)|(((prim)&15UL)<<0)) |
dreschpe | 0:5e013296b353 | 366 | #define COLOR_MASK(r,g,b,a) ((32UL<<24)|(((r)&1UL)<<3)|(((g)&1UL)<<2)|(((b)&1UL)<<1)|(((a)&1UL)<<0)) |
dreschpe | 0:5e013296b353 | 367 | #define CLEAR(c,s,t) ((38UL<<24)|(((c)&1UL)<<2)|(((s)&1UL)<<1)|(((t)&1UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 368 | #define VERTEX_FORMAT(frac) ((39UL<<24)|(((frac)&7UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 369 | #define BITMAP_LAYOUT_H(linestride,height) ((40UL<<24)|(((linestride)&3UL)<<2)|(((height)&3UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 370 | #define BITMAP_SIZE_H(width,height) ((41UL<<24)|(((width)&3UL)<<2)|(((height)&3UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 371 | #define PALETTE_SOURCE(addr) ((42UL<<24)|(((addr)&4194303UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 372 | #define VERTEX_TRANSLATE_X(x) ((43UL<<24)|(((x)&131071UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 373 | #define VERTEX_TRANSLATE_Y(y) ((44UL<<24)|(((y)&131071UL)<<0)) |
davidchilds | 7:a69ac4d39afd | 374 | #define NOP() ((45UL<<24)) |
dreschpe | 0:5e013296b353 | 375 | #define END() ((33UL<<24)) |
dreschpe | 0:5e013296b353 | 376 | #define SAVE_CONTEXT() ((34UL<<24)) |
dreschpe | 0:5e013296b353 | 377 | #define RESTORE_CONTEXT() ((35UL<<24)) |
dreschpe | 0:5e013296b353 | 378 | #define RETURN() ((36UL<<24)) |
dreschpe | 0:5e013296b353 | 379 | #define MACRO(m) ((37UL<<24)|(((m)&1UL)<<0)) |
dreschpe | 0:5e013296b353 | 380 | #define DISPLAY() ((0UL<<24)) |
davidchilds | 7:a69ac4d39afd | 381 | #endif |
dreschpe | 0:5e013296b353 | 382 | |
dreschpe | 0:5e013296b353 | 383 | #define FT_GPU_NUMCHAR_PERFONT (128) |
dreschpe | 0:5e013296b353 | 384 | #define FT_GPU_FONT_TABLE_SIZE (148) |
dreschpe | 0:5e013296b353 | 385 | |
davidchilds | 7:a69ac4d39afd | 386 | /* FT81x and FT80x font table structure */ |
dreschpe | 0:5e013296b353 | 387 | /* Font table address in ROM can be found by reading the address from 0xFFFFC location. */ |
dreschpe | 0:5e013296b353 | 388 | /* 16 font tables are present at the address read from location 0xFFFFC */ |
dreschpe | 0:5e013296b353 | 389 | typedef struct FT_Gpu_Fonts |
dreschpe | 0:5e013296b353 | 390 | { |
dreschpe | 0:5e013296b353 | 391 | /* All the values are in bytes */ |
dreschpe | 0:5e013296b353 | 392 | /* Width of each character font from 0 to 127 */ |
dreschpe | 0:5e013296b353 | 393 | ft_uint8_t FontWidth[FT_GPU_NUMCHAR_PERFONT]; |
dreschpe | 0:5e013296b353 | 394 | /* Bitmap format of font wrt bitmap formats supported by FT800 - L1, L4, L8 */ |
dreschpe | 0:5e013296b353 | 395 | ft_uint32_t FontBitmapFormat; |
dreschpe | 0:5e013296b353 | 396 | /* Font line stride in FT800 ROM */ |
dreschpe | 0:5e013296b353 | 397 | ft_uint32_t FontLineStride; |
dreschpe | 0:5e013296b353 | 398 | /* Font width in pixels */ |
dreschpe | 0:5e013296b353 | 399 | ft_uint32_t FontWidthInPixels; |
dreschpe | 0:5e013296b353 | 400 | /* Font height in pixels */ |
dreschpe | 0:5e013296b353 | 401 | ft_uint32_t FontHeightInPixels; |
dreschpe | 0:5e013296b353 | 402 | /* Pointer to font graphics raw data */ |
dreschpe | 0:5e013296b353 | 403 | ft_uint32_t PointerToFontGraphicsData; |
dreschpe | 0:5e013296b353 | 404 | }FT_Gpu_Fonts_t; |
dreschpe | 0:5e013296b353 | 405 | |
davidchilds | 7:a69ac4d39afd | 406 | |
dreschpe | 0:5e013296b353 | 407 | |
dreschpe | 0:5e013296b353 | 408 | |
dreschpe | 0:5e013296b353 | 409 | /* Nothing beyond this */ |
dreschpe | 0:5e013296b353 | 410 | |
dreschpe | 0:5e013296b353 | 411 |