808

Dependents:   Chromatograph_Mobile

Committer:
nikmaos
Date:
Tue Sep 01 10:52:05 2020 +0000
Revision:
13:5959af2ac87a
Parent:
10:6a81aeca25e3
1.09.2020

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cpm219 0:2d0ef4830603 1 #ifndef _FT_GPU_H_
cpm219 0:2d0ef4830603 2 #define _FT_GPU_H_
cpm219 0:2d0ef4830603 3
cpm219 0:2d0ef4830603 4 /* Definitions used for FT800 co processor command buffer */
cpm219 0:2d0ef4830603 5 #define FT_DL_SIZE (8*1024L) //8KB Display List buffer size
cpm219 0:2d0ef4830603 6 #define FT_CMD_FIFO_SIZE (4*1024L) //4KB coprocessor Fifo size
cpm219 0:2d0ef4830603 7 #define FT_CMD_SIZE (4) //4 byte per coprocessor command of EVE
cpm219 0:2d0ef4830603 8
cpm219 0:2d0ef4830603 9
cpm219 0:2d0ef4830603 10 /* For FT801, FT811 and FT813 */
cpm219 0:2d0ef4830603 11 #define CTOUCH_MODE_COMPATIBILITY 1
cpm219 0:2d0ef4830603 12 #define CTOUCH_MODE_EXTENDED 0
cpm219 0:2d0ef4830603 13
cpm219 0:2d0ef4830603 14 #define LOW_FREQ_BOUND 58800000L//98% of 60Mhz
cpm219 0:2d0ef4830603 15
cpm219 0:2d0ef4830603 16 #define RAM_G_SIZE 1024*1024L
cpm219 0:2d0ef4830603 17 #define FT81X_VERSION "1.0.4"
cpm219 0:2d0ef4830603 18
JackB 10:6a81aeca25e3 19 #define DL_CLEAR 0x26000000UL /* requires OR'd arguments */
JackB 10:6a81aeca25e3 20 #define DL_CLEAR_RGB 0x02000000UL /* requires OR'd arguments */
JackB 10:6a81aeca25e3 21 #define DL_COLOR_RGB 0x04000000UL /* requires OR'd arguments */
JackB 10:6a81aeca25e3 22 #define DL_POINT_SIZE 0x0D000000UL /* requires OR'd arguments */
JackB 10:6a81aeca25e3 23 #define DL_END 0x21000000UL
JackB 10:6a81aeca25e3 24 #define DL_BEGIN 0x1F000000UL /* requires OR'd arguments */
JackB 10:6a81aeca25e3 25 #define DL_DISPLAY 0x00000000UL
JackB 10:6a81aeca25e3 26
JackB 10:6a81aeca25e3 27 #define CLR_COL 0x4
JackB 10:6a81aeca25e3 28 #define CLR_STN 0x2
JackB 10:6a81aeca25e3 29 #define CLR_TAG 0x1
JackB 10:6a81aeca25e3 30
JackB 10:6a81aeca25e3 31 /* Host commands */
JackB 10:6a81aeca25e3 32 #define FT8_ACTIVE 0x00 /* place FT8xx in active state */
JackB 10:6a81aeca25e3 33 #define FT8_STANDBY 0x41 /* place FT8xx in Standby (clk running) */
JackB 10:6a81aeca25e3 34 #define FT8_SLEEP 0x42 /* place FT8xx in Sleep (clk off) */
JackB 10:6a81aeca25e3 35 #define FT8_PWRDOWN 0x50 /* place FT8xx in Power Down (core off) */
JackB 10:6a81aeca25e3 36 #define FT8_CLKEXT 0x44 /* select external clock source */
JackB 10:6a81aeca25e3 37 #define FT8_CLKINT 0x48 /* select internal clock source */
JackB 10:6a81aeca25e3 38 #define FT8_CORERST 0x68 /* reset core - all registers default and processors reset */
JackB 10:6a81aeca25e3 39 #define FT8_CLK48M 0x62 /* select 48MHz PLL output */
JackB 10:6a81aeca25e3 40 #define FT8_CLK36M 0x61 /* select 36MHz PLL output */
JackB 10:6a81aeca25e3 41
JackB 10:6a81aeca25e3 42
JackB 10:6a81aeca25e3 43 /* defines used for graphics commands */
JackB 10:6a81aeca25e3 44 #define FT8_NEVER 0UL
JackB 10:6a81aeca25e3 45 #define FT8_LESS 1UL
JackB 10:6a81aeca25e3 46 #define FT8_LEQUAL 2UL
JackB 10:6a81aeca25e3 47 #define FT8_GREATER 3UL
JackB 10:6a81aeca25e3 48 #define FT8_GEQUAL 4UL
JackB 10:6a81aeca25e3 49 #define FT8_EQUAL 5UL
JackB 10:6a81aeca25e3 50 #define FT8_NOTEQUAL 6UL
JackB 10:6a81aeca25e3 51 #define FT8_ALWAYS 7UL
JackB 10:6a81aeca25e3 52
JackB 10:6a81aeca25e3 53
JackB 10:6a81aeca25e3 54 /* Bitmap formats */
JackB 10:6a81aeca25e3 55 #define FT8_ARGB1555 0UL
JackB 10:6a81aeca25e3 56 #define FT8_L1 1UL
JackB 10:6a81aeca25e3 57 #define FT8_L4 2UL
JackB 10:6a81aeca25e3 58 #define FT8_L8 3UL
JackB 10:6a81aeca25e3 59 #define FT8_RGB332 4UL
JackB 10:6a81aeca25e3 60 #define FT8_ARGB2 5UL
JackB 10:6a81aeca25e3 61 #define FT8_ARGB4 6UL
JackB 10:6a81aeca25e3 62 #define FT8_RGB565 7UL
JackB 10:6a81aeca25e3 63 #define FT8_PALETTED 8UL
JackB 10:6a81aeca25e3 64 #define FT8_TEXT8X8 9UL
JackB 10:6a81aeca25e3 65 #define FT8_TEXTVGA 10UL
JackB 10:6a81aeca25e3 66 #define FT8_BARGRAPH 11UL
JackB 10:6a81aeca25e3 67
JackB 10:6a81aeca25e3 68
JackB 10:6a81aeca25e3 69 /* Bitmap filter types */
JackB 10:6a81aeca25e3 70 #define FT8_NEAREST 0UL
JackB 10:6a81aeca25e3 71 #define FT8_BILINEAR 1UL
JackB 10:6a81aeca25e3 72
JackB 10:6a81aeca25e3 73
JackB 10:6a81aeca25e3 74 /* Bitmap wrap types */
JackB 10:6a81aeca25e3 75 #define FT8_BORDER 0UL
JackB 10:6a81aeca25e3 76 #define FT8_REPEAT 1UL
JackB 10:6a81aeca25e3 77
JackB 10:6a81aeca25e3 78
JackB 10:6a81aeca25e3 79 /* Stencil defines */
JackB 10:6a81aeca25e3 80 #define FT8_KEEP 1UL
JackB 10:6a81aeca25e3 81 #define FT8_REPLACE 2UL
JackB 10:6a81aeca25e3 82 #define FT8_INCR 3UL
JackB 10:6a81aeca25e3 83 #define FT8_DECR 4UL
JackB 10:6a81aeca25e3 84 #define FT8_INVERT 5UL
JackB 10:6a81aeca25e3 85
JackB 10:6a81aeca25e3 86
JackB 10:6a81aeca25e3 87 /* Graphics display list swap defines */
JackB 10:6a81aeca25e3 88 #define FT8_DLSWAP_DONE 0UL
JackB 10:6a81aeca25e3 89 #define FT8_DLSWAP_LINE 1UL
JackB 10:6a81aeca25e3 90 #define FT8_DLSWAP_FRAME 2UL
JackB 10:6a81aeca25e3 91
JackB 10:6a81aeca25e3 92
JackB 10:6a81aeca25e3 93 /* Interrupt bits */
JackB 10:6a81aeca25e3 94 #define FT8_INT_SWAP 0x01
JackB 10:6a81aeca25e3 95 #define FT8_INT_TOUCH 0x02
JackB 10:6a81aeca25e3 96 #define FT8_INT_TAG 0x04
JackB 10:6a81aeca25e3 97 #define FT8_INT_SOUND 0x08
JackB 10:6a81aeca25e3 98 #define FT8_INT_PLAYBACK 0x10
JackB 10:6a81aeca25e3 99 #define FT8_INT_CMDEMPTY 0x20
JackB 10:6a81aeca25e3 100 #define FT8_INT_CMDFLAG 0x40
JackB 10:6a81aeca25e3 101 #define FT8_INT_CONVCOMPLETE 0x80
JackB 10:6a81aeca25e3 102
JackB 10:6a81aeca25e3 103
JackB 10:6a81aeca25e3 104 /* Touch mode */
JackB 10:6a81aeca25e3 105 #define FT8_TMODE_OFF 0
JackB 10:6a81aeca25e3 106 #define FT8_TMODE_ONESHOT 1
JackB 10:6a81aeca25e3 107 #define FT8_TMODE_FRAME 2
JackB 10:6a81aeca25e3 108 #define FT8_TMODE_CONTINUOUS 3
JackB 10:6a81aeca25e3 109
JackB 10:6a81aeca25e3 110
JackB 10:6a81aeca25e3 111 /* Alpha blending */
JackB 10:6a81aeca25e3 112 #define FT8_ZERO 0UL
JackB 10:6a81aeca25e3 113 #define FT8_ONE 1UL
JackB 10:6a81aeca25e3 114 #define FT8_SRC_ALPHA 2UL
JackB 10:6a81aeca25e3 115 #define FT8_DST_ALPHA 3UL
JackB 10:6a81aeca25e3 116 #define FT8_ONE_MINUS_SRC_ALPHA 4UL
JackB 10:6a81aeca25e3 117 #define FT8_ONE_MINUS_DST_ALPHA 5UL
JackB 10:6a81aeca25e3 118
JackB 10:6a81aeca25e3 119
JackB 10:6a81aeca25e3 120 /* Graphics primitives */
JackB 10:6a81aeca25e3 121 #define FT8_BITMAPS 1UL
JackB 10:6a81aeca25e3 122 #define FT8_POINTS 2UL
JackB 10:6a81aeca25e3 123 #define FT8_LINES 3UL
JackB 10:6a81aeca25e3 124 #define FT8_LINE_STRIP 4UL
JackB 10:6a81aeca25e3 125 #define FT8_EDGE_STRIP_R 5UL
JackB 10:6a81aeca25e3 126 #define FT8_EDGE_STRIP_L 6UL
JackB 10:6a81aeca25e3 127 #define FT8_EDGE_STRIP_A 7UL
JackB 10:6a81aeca25e3 128 #define FT8_EDGE_STRIP_B 8UL
JackB 10:6a81aeca25e3 129 #define FT8_RECTS 9UL
JackB 10:6a81aeca25e3 130
JackB 10:6a81aeca25e3 131
JackB 10:6a81aeca25e3 132 /* Widget command */
JackB 10:6a81aeca25e3 133 #define FT8_OPT_MONO 1
JackB 10:6a81aeca25e3 134 #define FT8_OPT_NODL 2
JackB 10:6a81aeca25e3 135 #define FT8_OPT_FLAT 256
JackB 10:6a81aeca25e3 136 #define FT8_OPT_CENTERX 512
JackB 10:6a81aeca25e3 137 #define FT8_OPT_CENTERY 1024
JackB 10:6a81aeca25e3 138 #define FT8_OPT_CENTER (FT8_OPT_CENTERX | FT8_OPT_CENTERY)
JackB 10:6a81aeca25e3 139 #define FT8_OPT_NOBACK 4096
JackB 10:6a81aeca25e3 140 #define FT8_OPT_NOTICKS 8192
JackB 10:6a81aeca25e3 141 #define FT8_OPT_NOHM 16384
JackB 10:6a81aeca25e3 142 #define FT8_OPT_NOPOINTER 16384
JackB 10:6a81aeca25e3 143 #define FT8_OPT_NOSECS 32768
JackB 10:6a81aeca25e3 144 #define FT8_OPT_NOHANDS 49152
JackB 10:6a81aeca25e3 145 #define FT8_OPT_RIGHTX 2048
JackB 10:6a81aeca25e3 146 #define FT8_OPT_SIGNED 256
JackB 10:6a81aeca25e3 147
JackB 10:6a81aeca25e3 148
JackB 10:6a81aeca25e3 149 /* Defines related to inbuilt font */
JackB 10:6a81aeca25e3 150 #define FT8_NUMCHAR_PERFONT (128L) /* number of font characters per bitmap handle */
JackB 10:6a81aeca25e3 151 #define FT8_FONT_TABLE_SIZE (148L) /* size of the font table - utilized for loopup by the graphics engine */
JackB 10:6a81aeca25e3 152 #define FT8_FONT_TABLE_POINTER (0xFFFFCUL) /* pointer to the inbuilt font tables starting from bitmap handle 16 */
JackB 10:6a81aeca25e3 153
JackB 10:6a81aeca25e3 154
JackB 10:6a81aeca25e3 155 /* Audio sample type defines */
JackB 10:6a81aeca25e3 156 #define FT8_LINEAR_SAMPLES 0UL /* 8bit signed samples */
JackB 10:6a81aeca25e3 157 #define FT8_ULAW_SAMPLES 1UL /* 8bit ulaw samples */
JackB 10:6a81aeca25e3 158 #define FT8_ADPCM_SAMPLES 2UL /* 4bit ima adpcm samples */
JackB 10:6a81aeca25e3 159
JackB 10:6a81aeca25e3 160
JackB 10:6a81aeca25e3 161 /* Synthesized sound */
JackB 10:6a81aeca25e3 162 #define FT8_SILENCE 0x00
JackB 10:6a81aeca25e3 163 #define FT8_SQUAREWAVE 0x01
JackB 10:6a81aeca25e3 164 #define FT8_SINEWAVE 0x02
JackB 10:6a81aeca25e3 165 #define FT8_SAWTOOTH 0x03
JackB 10:6a81aeca25e3 166 #define FT8_TRIANGLE 0x04
JackB 10:6a81aeca25e3 167 #define FT8_BEEPING 0x05
JackB 10:6a81aeca25e3 168 #define FT8_ALARM 0x06
JackB 10:6a81aeca25e3 169 #define FT8_WARBLE 0x07
JackB 10:6a81aeca25e3 170 #define FT8_CAROUSEL 0x08
JackB 10:6a81aeca25e3 171 #define FT8_PIPS(n) (0x0F + (n))
JackB 10:6a81aeca25e3 172 #define FT8_HARP 0x40
JackB 10:6a81aeca25e3 173 #define FT8_XYLOPHONE 0x41
JackB 10:6a81aeca25e3 174 #define FT8_TUBA 0x42
JackB 10:6a81aeca25e3 175 #define FT8_GLOCKENSPIEL 0x43
JackB 10:6a81aeca25e3 176 #define FT8_ORGAN 0x44
JackB 10:6a81aeca25e3 177 #define FT8_TRUMPET 0x45
JackB 10:6a81aeca25e3 178 #define FT8_PIANO 0x46
JackB 10:6a81aeca25e3 179 #define FT8_CHIMES 0x47
JackB 10:6a81aeca25e3 180 #define FT8_MUSICBOX 0x48
JackB 10:6a81aeca25e3 181 #define FT8_BELL 0x49
JackB 10:6a81aeca25e3 182 #define FT8_CLICK 0x50
JackB 10:6a81aeca25e3 183 #define FT8_SWITCH 0x51
JackB 10:6a81aeca25e3 184 #define FT8_COWBELL 0x52
JackB 10:6a81aeca25e3 185 #define FT8_NOTCH 0x53
JackB 10:6a81aeca25e3 186 #define FT8_HIHAT 0x54
JackB 10:6a81aeca25e3 187 #define FT8_KICKDRUM 0x55
JackB 10:6a81aeca25e3 188 #define FT8_POP 0x56
JackB 10:6a81aeca25e3 189 #define FT8_CLACK 0x57
JackB 10:6a81aeca25e3 190 #define FT8_CHACK 0x58
JackB 10:6a81aeca25e3 191 #define FT8_MUTE 0x60
JackB 10:6a81aeca25e3 192 #define FT8_UNMUTE 0x61
JackB 10:6a81aeca25e3 193
JackB 10:6a81aeca25e3 194
JackB 10:6a81aeca25e3 195 /* Synthesized sound frequencies, midi note */
JackB 10:6a81aeca25e3 196 #define FT8_MIDI_A0 21
JackB 10:6a81aeca25e3 197 #define FT8_MIDI_A_0 22
JackB 10:6a81aeca25e3 198 #define FT8_MIDI_B0 23
JackB 10:6a81aeca25e3 199 #define FT8_MIDI_C1 24
JackB 10:6a81aeca25e3 200 #define FT8_MIDI_C_1 25
JackB 10:6a81aeca25e3 201 #define FT8_MIDI_D1 26
JackB 10:6a81aeca25e3 202 #define FT8_MIDI_D_1 27
JackB 10:6a81aeca25e3 203 #define FT8_MIDI_E1 28
JackB 10:6a81aeca25e3 204 #define FT8_MIDI_F1 29
JackB 10:6a81aeca25e3 205 #define FT8_MIDI_F_1 30
JackB 10:6a81aeca25e3 206 #define FT8_MIDI_G1 31
JackB 10:6a81aeca25e3 207 #define FT8_MIDI_G_1 32
JackB 10:6a81aeca25e3 208 #define FT8_MIDI_A1 33
JackB 10:6a81aeca25e3 209 #define FT8_MIDI_A_1 34
JackB 10:6a81aeca25e3 210 #define FT8_MIDI_B1 35
JackB 10:6a81aeca25e3 211 #define FT8_MIDI_C2 36
JackB 10:6a81aeca25e3 212 #define FT8_MIDI_C_2 37
JackB 10:6a81aeca25e3 213 #define FT8_MIDI_D2 38
JackB 10:6a81aeca25e3 214 #define FT8_MIDI_D_2 39
JackB 10:6a81aeca25e3 215 #define FT8_MIDI_E2 40
JackB 10:6a81aeca25e3 216 #define FT8_MIDI_F2 41
JackB 10:6a81aeca25e3 217 #define FT8_MIDI_F_2 42
JackB 10:6a81aeca25e3 218 #define FT8_MIDI_G2 43
JackB 10:6a81aeca25e3 219 #define FT8_MIDI_G_2 44
JackB 10:6a81aeca25e3 220 #define FT8_MIDI_A2 45
JackB 10:6a81aeca25e3 221 #define FT8_MIDI_A_2 46
JackB 10:6a81aeca25e3 222 #define FT8_MIDI_B2 47
JackB 10:6a81aeca25e3 223 #define FT8_MIDI_C3 48
JackB 10:6a81aeca25e3 224 #define FT8_MIDI_C_3 49
JackB 10:6a81aeca25e3 225 #define FT8_MIDI_D3 50
JackB 10:6a81aeca25e3 226 #define FT8_MIDI_D_3 51
JackB 10:6a81aeca25e3 227 #define FT8_MIDI_E3 52
JackB 10:6a81aeca25e3 228 #define FT8_MIDI_F3 53
JackB 10:6a81aeca25e3 229 #define FT8_MIDI_F_3 54
JackB 10:6a81aeca25e3 230 #define FT8_MIDI_G3 55
JackB 10:6a81aeca25e3 231 #define FT8_MIDI_G_3 56
JackB 10:6a81aeca25e3 232 #define FT8_MIDI_A3 57
JackB 10:6a81aeca25e3 233 #define FT8_MIDI_A_3 58
JackB 10:6a81aeca25e3 234 #define FT8_MIDI_B3 59
JackB 10:6a81aeca25e3 235 #define FT8_MIDI_C4 60
JackB 10:6a81aeca25e3 236 #define FT8_MIDI_C_4 61
JackB 10:6a81aeca25e3 237 #define FT8_MIDI_D4 62
JackB 10:6a81aeca25e3 238 #define FT8_MIDI_D_4 63
JackB 10:6a81aeca25e3 239 #define FT8_MIDI_E4 64
JackB 10:6a81aeca25e3 240 #define FT8_MIDI_F4 65
JackB 10:6a81aeca25e3 241 #define FT8_MIDI_F_4 66
JackB 10:6a81aeca25e3 242 #define FT8_MIDI_G4 67
JackB 10:6a81aeca25e3 243 #define FT8_MIDI_G_4 68
JackB 10:6a81aeca25e3 244 #define FT8_MIDI_A4 69
JackB 10:6a81aeca25e3 245 #define FT8_MIDI_A_4 70
JackB 10:6a81aeca25e3 246 #define FT8_MIDI_B4 71
JackB 10:6a81aeca25e3 247 #define FT8_MIDI_C5 72
JackB 10:6a81aeca25e3 248 #define FT8_MIDI_C_5 73
JackB 10:6a81aeca25e3 249 #define FT8_MIDI_D5 74
JackB 10:6a81aeca25e3 250 #define FT8_MIDI_D_5 75
JackB 10:6a81aeca25e3 251 #define FT8_MIDI_E5 76
JackB 10:6a81aeca25e3 252 #define FT8_MIDI_F5 77
JackB 10:6a81aeca25e3 253 #define FT8_MIDI_F_5 78
JackB 10:6a81aeca25e3 254 #define FT8_MIDI_G5 79
JackB 10:6a81aeca25e3 255 #define FT8_MIDI_G_5 80
JackB 10:6a81aeca25e3 256 #define FT8_MIDI_A5 81
JackB 10:6a81aeca25e3 257 #define FT8_MIDI_A_5 82
JackB 10:6a81aeca25e3 258 #define FT8_MIDI_B5 83
JackB 10:6a81aeca25e3 259 #define FT8_MIDI_C6 84
JackB 10:6a81aeca25e3 260 #define FT8_MIDI_C_6 85
JackB 10:6a81aeca25e3 261 #define FT8_MIDI_D6 86
JackB 10:6a81aeca25e3 262 #define FT8_MIDI_D_6 87
JackB 10:6a81aeca25e3 263 #define FT8_MIDI_E6 88
JackB 10:6a81aeca25e3 264 #define FT8_MIDI_F6 89
JackB 10:6a81aeca25e3 265 #define FT8_MIDI_F_6 90
JackB 10:6a81aeca25e3 266 #define FT8_MIDI_G6 91
JackB 10:6a81aeca25e3 267 #define FT8_MIDI_G_6 92
JackB 10:6a81aeca25e3 268 #define FT8_MIDI_A6 93
JackB 10:6a81aeca25e3 269 #define FT8_MIDI_A_6 94
JackB 10:6a81aeca25e3 270 #define FT8_MIDI_B6 95
JackB 10:6a81aeca25e3 271 #define FT8_MIDI_C7 96
JackB 10:6a81aeca25e3 272 #define FT8_MIDI_C_7 97
JackB 10:6a81aeca25e3 273 #define FT8_MIDI_D7 98
JackB 10:6a81aeca25e3 274 #define FT8_MIDI_D_7 99
JackB 10:6a81aeca25e3 275 #define FT8_MIDI_E7 100
JackB 10:6a81aeca25e3 276 #define FT8_MIDI_F7 101
JackB 10:6a81aeca25e3 277 #define FT8_MIDI_F_7 102
JackB 10:6a81aeca25e3 278 #define FT8_MIDI_G7 103
JackB 10:6a81aeca25e3 279 #define FT8_MIDI_G_7 104
JackB 10:6a81aeca25e3 280 #define FT8_MIDI_A7 105
JackB 10:6a81aeca25e3 281 #define FT8_MIDI_A_7 106
JackB 10:6a81aeca25e3 282 #define FT8_MIDI_B7 107
JackB 10:6a81aeca25e3 283 #define FT8_MIDI_C8 108
JackB 10:6a81aeca25e3 284
JackB 10:6a81aeca25e3 285
JackB 10:6a81aeca25e3 286 /* GPIO bits */
JackB 10:6a81aeca25e3 287 #define FT8_GPIO0 0
JackB 10:6a81aeca25e3 288 #define FT8_GPIO1 1 /* default gpio pin for audio shutdown, 1 - eanble, 0 - disable */
JackB 10:6a81aeca25e3 289 #define FT8_GPIO7 7 /* default gpio pin for display enable, 1 - enable, 0 - disable */
JackB 10:6a81aeca25e3 290
JackB 10:6a81aeca25e3 291
JackB 10:6a81aeca25e3 292 /* Display rotation */
JackB 10:6a81aeca25e3 293 #define FT8_DISPLAY_0 0 /* 0 degrees rotation */
JackB 10:6a81aeca25e3 294 #define FT8_DISPLAY_180 1 /* 180 degrees rotation */
JackB 10:6a81aeca25e3 295 #define FT8_DISPLAY_90 1 /* 90 degrees rotation */
JackB 10:6a81aeca25e3 296 #define FT8_DISPLAY_270 1 /* 270 degrees rotation */
JackB 10:6a81aeca25e3 297
JackB 10:6a81aeca25e3 298 #define FT8_DISPLAY_LANDSCAPE_0 0 /* 0 degrees rotation */
JackB 10:6a81aeca25e3 299 #define FT8_DISPLAY_LANDSCAPE_180 1 /* 180 degrees rotation */
JackB 10:6a81aeca25e3 300 #define FT8_DISPLAY_PORTRAIT_90CCW 2 /* 270 degrees rotation */
JackB 10:6a81aeca25e3 301 #define FT8_DISPLAY_PORTRAIT_90CW 3 /* 90 degrees rotation */
JackB 10:6a81aeca25e3 302
JackB 10:6a81aeca25e3 303
JackB 10:6a81aeca25e3 304 // 0 ARGB1555
JackB 10:6a81aeca25e3 305 // 1 L1
JackB 10:6a81aeca25e3 306 // 2 L4
JackB 10:6a81aeca25e3 307 // 3 L8
JackB 10:6a81aeca25e3 308 // 4 RGB332
JackB 10:6a81aeca25e3 309 // 5 ARGB2
JackB 10:6a81aeca25e3 310 // 6 ARGB4
JackB 10:6a81aeca25e3 311 // 7 RGB565
JackB 10:6a81aeca25e3 312 // 8 PALETTED
JackB 10:6a81aeca25e3 313 // 9 TEXT8X8
JackB 10:6a81aeca25e3 314 // 10 TEXTVGA
JackB 10:6a81aeca25e3 315 // 11 BARGRAPH
JackB 10:6a81aeca25e3 316 // 14 PALETTED565
JackB 10:6a81aeca25e3 317 // 15 PALETTED4444
JackB 10:6a81aeca25e3 318 // 16 PALETTED8
JackB 10:6a81aeca25e3 319 // 17 L2
JackB 10:6a81aeca25e3 320
JackB 10:6a81aeca25e3 321 // 0 OPT_RGB565
JackB 10:6a81aeca25e3 322 // 1 OPT_MONO
JackB 10:6a81aeca25e3 323 // 2 OPT_NODL
JackB 10:6a81aeca25e3 324 // 256 OPT_FLAT
JackB 10:6a81aeca25e3 325 // 256 OPT_SIGNED
JackB 10:6a81aeca25e3 326 // 512 OPT_CENTERX
JackB 10:6a81aeca25e3 327 // 1024 OPT_CENTERY
JackB 10:6a81aeca25e3 328 // 1536 OPT_CENTER
JackB 10:6a81aeca25e3 329 // 2048 OPT_RIGHTX
JackB 10:6a81aeca25e3 330 // 4096 OPT_NOBACK
JackB 10:6a81aeca25e3 331 // 8192 OPT_NOTICKS
JackB 10:6a81aeca25e3 332
cpm219 0:2d0ef4830603 333 #define ADC_DIFFERENTIAL 1UL
cpm219 0:2d0ef4830603 334 #define ADC_SINGLE_ENDED 0UL
cpm219 0:2d0ef4830603 335 #define ADPCM_SAMPLES 2UL
cpm219 0:2d0ef4830603 336 #define ALWAYS 7UL
JackB 10:6a81aeca25e3 337 #define ARGB1555 0UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
JackB 10:6a81aeca25e3 338 #define ARGB2 5UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
JackB 10:6a81aeca25e3 339 #define ARGB4 6UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
JackB 10:6a81aeca25e3 340 #define BARGRAPH 11UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
cpm219 0:2d0ef4830603 341 #define BILINEAR 1UL
cpm219 0:2d0ef4830603 342 #define BITMAPS 1UL
cpm219 0:2d0ef4830603 343 #define BORDER 0UL
cpm219 0:2d0ef4830603 344 #define CMDBUF_SIZE 4096UL
cpm219 0:2d0ef4830603 345 #define CMD_APPEND 4294967070UL
cpm219 0:2d0ef4830603 346 #define CMD_BGCOLOR 4294967049UL
cpm219 0:2d0ef4830603 347 #define CMD_BITMAP_TRANSFORM 4294967073UL
cpm219 0:2d0ef4830603 348 #define CMD_BUTTON 4294967053UL
cpm219 0:2d0ef4830603 349 #define CMD_CALIBRATE 4294967061UL
cpm219 0:2d0ef4830603 350 #define CMD_CLOCK 4294967060UL
cpm219 0:2d0ef4830603 351 #define CMD_COLDSTART 4294967090UL
cpm219 0:2d0ef4830603 352 #define CMD_CRC 4294967043UL
cpm219 0:2d0ef4830603 353 #define CMD_CSKETCH 4294967093UL
cpm219 0:2d0ef4830603 354 #define CMD_DIAL 4294967085UL
cpm219 0:2d0ef4830603 355 #define CMD_DLSTART 4294967040UL
cpm219 0:2d0ef4830603 356 #define CMD_EXECUTE 4294967047UL
cpm219 0:2d0ef4830603 357 #define CMD_FGCOLOR 4294967050UL
cpm219 0:2d0ef4830603 358 #define CMD_GAUGE 4294967059UL
cpm219 0:2d0ef4830603 359 #define CMD_GETMATRIX 4294967091UL
cpm219 0:2d0ef4830603 360 #define CMD_GETPOINT 4294967048UL
cpm219 0:2d0ef4830603 361 #define CMD_GETPROPS 4294967077UL
cpm219 0:2d0ef4830603 362 #define CMD_GETPTR 4294967075UL
cpm219 0:2d0ef4830603 363 #define CMD_GRADCOLOR 4294967092UL
cpm219 0:2d0ef4830603 364 #define CMD_GRADIENT 4294967051UL
cpm219 0:2d0ef4830603 365 #define CMD_HAMMERAUX 4294967044UL
cpm219 0:2d0ef4830603 366 #define CMD_IDCT_DELETED 4294967046UL
cpm219 0:2d0ef4830603 367 #define CMD_INFLATE 4294967074UL
cpm219 0:2d0ef4830603 368 #define CMD_INTERRUPT 4294967042UL
cpm219 0:2d0ef4830603 369 #define CMD_INT_RAMSHARED 4294967101UL
cpm219 0:2d0ef4830603 370 #define CMD_INT_SWLOADIMAGE 4294967102UL
cpm219 0:2d0ef4830603 371 #define CMD_KEYS 4294967054UL
cpm219 0:2d0ef4830603 372 #define CMD_LOADIDENTITY 4294967078UL
cpm219 0:2d0ef4830603 373 #define CMD_LOADIMAGE 4294967076UL
cpm219 0:2d0ef4830603 374 #define CMD_LOGO 4294967089UL
cpm219 0:2d0ef4830603 375 #define CMD_MARCH 4294967045UL
cpm219 0:2d0ef4830603 376 #define CMD_MEDIAFIFO 4294967097UL
cpm219 0:2d0ef4830603 377 #define CMD_MEMCPY 4294967069UL
cpm219 0:2d0ef4830603 378 #define CMD_MEMCRC 4294967064UL
cpm219 0:2d0ef4830603 379 #define CMD_MEMSET 4294967067UL
cpm219 0:2d0ef4830603 380 #define CMD_MEMWRITE 4294967066UL
cpm219 0:2d0ef4830603 381 #define CMD_MEMZERO 4294967068UL
cpm219 0:2d0ef4830603 382 #define CMD_NUMBER 4294967086UL
cpm219 0:2d0ef4830603 383 #define CMD_PLAYVIDEO 4294967098UL
cpm219 0:2d0ef4830603 384 #define CMD_PROGRESS 4294967055UL
cpm219 0:2d0ef4830603 385 #define CMD_REGREAD 4294967065UL
cpm219 0:2d0ef4830603 386 #define CMD_ROMFONT 4294967103UL
cpm219 0:2d0ef4830603 387 #define CMD_ROTATE 4294967081UL
cpm219 0:2d0ef4830603 388 #define CMD_SCALE 4294967080UL
cpm219 0:2d0ef4830603 389 #define CMD_SCREENSAVER 4294967087UL
cpm219 0:2d0ef4830603 390 #define CMD_SCROLLBAR 4294967057UL
cpm219 0:2d0ef4830603 391 #define CMD_SETBASE 4294967096UL
cpm219 0:2d0ef4830603 392 #define CMD_SETBITMAP 4294967107UL
cpm219 0:2d0ef4830603 393 #define CMD_SETFONT 4294967083UL
cpm219 0:2d0ef4830603 394 #define CMD_SETFONT2 4294967099UL
cpm219 0:2d0ef4830603 395 #define CMD_SETMATRIX 4294967082UL
cpm219 0:2d0ef4830603 396 #define CMD_SETROTATE 4294967094UL
cpm219 0:2d0ef4830603 397 #define CMD_SETSCRATCH 4294967100UL
cpm219 0:2d0ef4830603 398 #define CMD_SKETCH 4294967088UL
cpm219 0:2d0ef4830603 399 #define CMD_SLIDER 4294967056UL
cpm219 0:2d0ef4830603 400 #define CMD_SNAPSHOT 4294967071UL
cpm219 0:2d0ef4830603 401 #define CMD_SNAPSHOT2 4294967095UL
cpm219 0:2d0ef4830603 402 #define CMD_SPINNER 4294967062UL
cpm219 0:2d0ef4830603 403 #define CMD_STOP 4294967063UL
cpm219 0:2d0ef4830603 404 #define CMD_SWAP 4294967041UL
cpm219 0:2d0ef4830603 405 #define CMD_SYNC 4294967106UL
cpm219 0:2d0ef4830603 406 #define CMD_TEXT 4294967052UL
cpm219 0:2d0ef4830603 407 #define CMD_TOGGLE 4294967058UL
cpm219 0:2d0ef4830603 408 #define CMD_TOUCH_TRANSFORM 4294967072UL
cpm219 0:2d0ef4830603 409 #define CMD_TRACK 4294967084UL
cpm219 0:2d0ef4830603 410 #define CMD_TRANSLATE 4294967079UL
cpm219 0:2d0ef4830603 411 #define CMD_VIDEOFRAME 4294967105UL
cpm219 0:2d0ef4830603 412 #define CMD_VIDEOSTART 4294967104UL
cpm219 0:2d0ef4830603 413 #define DECR 4UL
cpm219 0:2d0ef4830603 414 #define DLSWAP_DONE 0UL
cpm219 0:2d0ef4830603 415 #define DLSWAP_FRAME 2UL
cpm219 0:2d0ef4830603 416 #define DLSWAP_LINE 1UL
cpm219 0:2d0ef4830603 417 #define DST_ALPHA 3UL
cpm219 0:2d0ef4830603 418 #define EDGE_STRIP_A 7UL
cpm219 0:2d0ef4830603 419 #define EDGE_STRIP_B 8UL
cpm219 0:2d0ef4830603 420 #define EDGE_STRIP_L 6UL
cpm219 0:2d0ef4830603 421 #define EDGE_STRIP_R 5UL
cpm219 0:2d0ef4830603 422 #define EQUAL 5UL
cpm219 0:2d0ef4830603 423 #define GEQUAL 4UL
cpm219 0:2d0ef4830603 424 #define GREATER 3UL
cpm219 0:2d0ef4830603 425 #define INCR 3UL
cpm219 0:2d0ef4830603 426 #define INT_CMDEMPTY 32UL
cpm219 0:2d0ef4830603 427 #define INT_CMDFLAG 64UL
cpm219 0:2d0ef4830603 428 #define INT_CONVCOMPLETE 128UL
cpm219 0:2d0ef4830603 429 #define INT_G8 18UL
cpm219 0:2d0ef4830603 430 #define INT_L8C 12UL
cpm219 0:2d0ef4830603 431 #define INT_PLAYBACK 16UL
cpm219 0:2d0ef4830603 432 #define INT_SOUND 8UL
cpm219 0:2d0ef4830603 433 #define INT_SWAP 1UL
cpm219 0:2d0ef4830603 434 #define INT_TAG 4UL
cpm219 0:2d0ef4830603 435 #define INT_TOUCH 2UL
cpm219 0:2d0ef4830603 436 #define INT_VGA 13UL
cpm219 0:2d0ef4830603 437 #define INVERT 5UL
cpm219 0:2d0ef4830603 438 #define KEEP 1UL
JackB 10:6a81aeca25e3 439 #define L1 1UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
JackB 10:6a81aeca25e3 440 #define L2 17UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
JackB 10:6a81aeca25e3 441 #define L4 2UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
JackB 10:6a81aeca25e3 442 #define L8 3UL // ARGB1555, L1, L4, L8, RGB332, ARGB2, ARGB4, RGB565, PALETTED, TEXT8X8, TEXTVGA, BARGRAPH, PALETTED565, PALETTED4444, PALETTED8, L2
cpm219 0:2d0ef4830603 443 #define LEQUAL 2UL
cpm219 0:2d0ef4830603 444 #define LESS 1UL
cpm219 0:2d0ef4830603 445 #define LINEAR_SAMPLES 0UL
cpm219 0:2d0ef4830603 446 #define LINES 3UL
cpm219 0:2d0ef4830603 447 #define LINE_STRIP 4UL
cpm219 0:2d0ef4830603 448 #define NEAREST 0UL
cpm219 0:2d0ef4830603 449 #define NEVER 0UL
cpm219 0:2d0ef4830603 450 #define NOTEQUAL 6UL
cpm219 0:2d0ef4830603 451 #define ONE 1UL
cpm219 0:2d0ef4830603 452 #define ONE_MINUS_DST_ALPHA 5UL
cpm219 0:2d0ef4830603 453 #define ONE_MINUS_SRC_ALPHA 4UL
cpm219 0:2d0ef4830603 454 #define OPT_CENTER 1536UL
cpm219 0:2d0ef4830603 455 #define OPT_CENTERX 512UL
cpm219 0:2d0ef4830603 456 #define OPT_CENTERY 1024UL
cpm219 0:2d0ef4830603 457 #define OPT_FLAT 256UL
cpm219 0:2d0ef4830603 458 #define OPT_FULLSCREEN 8UL
cpm219 0:2d0ef4830603 459 #define OPT_MEDIAFIFO 16UL
JackB 10:6a81aeca25e3 460 #define OPT_RGB565 0UL
cpm219 0:2d0ef4830603 461 #define OPT_MONO 1UL
cpm219 0:2d0ef4830603 462 #define OPT_NOBACK 4096UL
cpm219 0:2d0ef4830603 463 #define OPT_NODL 2UL
cpm219 0:2d0ef4830603 464 #define OPT_NOHANDS 49152UL
cpm219 0:2d0ef4830603 465 #define OPT_NOHM 16384UL
cpm219 0:2d0ef4830603 466 #define OPT_NOPOINTER 16384UL
cpm219 0:2d0ef4830603 467 #define OPT_NOSECS 32768UL
cpm219 0:2d0ef4830603 468 #define OPT_NOTEAR 4UL
cpm219 0:2d0ef4830603 469 #define OPT_NOTICKS 8192UL
cpm219 0:2d0ef4830603 470 #define OPT_RIGHTX 2048UL
cpm219 0:2d0ef4830603 471 #define OPT_SIGNED 256UL
cpm219 0:2d0ef4830603 472 #define OPT_SOUND 32UL
JackB 10:6a81aeca25e3 473 #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
JackB 10:6a81aeca25e3 474 #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
JackB 10:6a81aeca25e3 475 #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
JackB 10:6a81aeca25e3 476 #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
JackB 10:6a81aeca25e3 477 #define POINTS 2UL
cpm219 0:2d0ef4830603 478 #define FTPOINTS 2UL
JackB 10:6a81aeca25e3 479 #define RAM_CMD 3178496UL // 0x30 8000
JackB 10:6a81aeca25e3 480 #define RAM_DL 3145728UL // 0x30 0000
cpm219 0:2d0ef4830603 481 #define RAM_G 0UL
JackB 10:6a81aeca25e3 482 #define RAM_REG 3153920UL // 0x30 2000
JackB 10:6a81aeca25e3 483 #define RAM_ROMSUB 3186688UL // 0x30 A000
JackB 10:6a81aeca25e3 484 #define RAM_SCREENSHOT 3940352UL // 0x3C 2000 (not documented!)
cpm219 0:2d0ef4830603 485 #define RECTS 9UL
cpm219 0:2d0ef4830603 486
cpm219 0:2d0ef4830603 487 #define ROMFONT_TABLEADDRESS 3145724UL
cpm219 0:2d0ef4830603 488
cpm219 0:2d0ef4830603 489 #define REG_ANALOG 3154284UL
cpm219 0:2d0ef4830603 490 #define REG_ANA_COMP 3154308UL
cpm219 0:2d0ef4830603 491 #define REG_BIST_EN 3154292UL
cpm219 0:2d0ef4830603 492 #define REG_BUSYBITS 3154152UL
cpm219 0:2d0ef4830603 493 #define REG_CLOCK 3153928UL
cpm219 0:2d0ef4830603 494 #define REG_CMDB_SPACE 3155316UL
cpm219 0:2d0ef4830603 495 #define REG_CMDB_WRITE 3155320UL
cpm219 0:2d0ef4830603 496 #define REG_CMD_DL 3154176UL
cpm219 0:2d0ef4830603 497 #define REG_CMD_READ 3154168UL
cpm219 0:2d0ef4830603 498 #define REG_CMD_WRITE 3154172UL
cpm219 0:2d0ef4830603 499 #define REG_CPURESET 3153952UL
cpm219 0:2d0ef4830603 500 #define REG_CRC 3154296UL
cpm219 0:2d0ef4830603 501 #define REG_CSPREAD 3154024UL
cpm219 0:2d0ef4830603 502 #define REG_CTOUCH_EXTENDED 3154184UL
cpm219 0:2d0ef4830603 503 //modified below to reflect the same as datasheet
cpm219 0:2d0ef4830603 504 #define REG_CTOUCH_TOUCH0_XY 3154212UL
cpm219 0:2d0ef4830603 505 #define REG_CTOUCH_TOUCH4_X 3154284UL
cpm219 0:2d0ef4830603 506 #define REG_CTOUCH_TOUCH4_Y 3154208UL
cpm219 0:2d0ef4830603 507 #define REG_CTOUCH_TOUCH1_XY 3154204UL
cpm219 0:2d0ef4830603 508 #define REG_CTOUCH_TOUCH2_XY 3154316UL
cpm219 0:2d0ef4830603 509 #define REG_CTOUCH_TOUCH3_XY 3154320UL
cpm219 0:2d0ef4830603 510 #define REG_CYA_TOUCH 3154280UL
cpm219 0:2d0ef4830603 511 #define REG_DATESTAMP 3155300UL
cpm219 0:2d0ef4830603 512 #define REG_DITHER 3154016UL
cpm219 0:2d0ef4830603 513 #define REG_DLSWAP 3154004UL
cpm219 0:2d0ef4830603 514 #define REG_FRAMES 3153924UL
cpm219 0:2d0ef4830603 515 #define REG_FREQUENCY 3153932UL
cpm219 0:2d0ef4830603 516 #define REG_GPIO 3154068UL
cpm219 0:2d0ef4830603 517 #define REG_GPIOX 3154076UL
cpm219 0:2d0ef4830603 518 #define REG_GPIOX_DIR 3154072UL
cpm219 0:2d0ef4830603 519 #define REG_GPIO_DIR 3154064UL
cpm219 0:2d0ef4830603 520 #define REG_HCYCLE 3153964UL
cpm219 0:2d0ef4830603 521 #define REG_HOFFSET 3153968UL
cpm219 0:2d0ef4830603 522 #define REG_HSIZE 3153972UL
cpm219 0:2d0ef4830603 523 #define REG_HSYNC0 3153976UL
cpm219 0:2d0ef4830603 524 #define REG_HSYNC1 3153980UL
cpm219 0:2d0ef4830603 525 #define REG_ID 3153920UL
cpm219 0:2d0ef4830603 526 #define REG_INT_EN 3154092UL
cpm219 0:2d0ef4830603 527 #define REG_INT_FLAGS 3154088UL
cpm219 0:2d0ef4830603 528 #define REG_INT_MASK 3154096UL
cpm219 0:2d0ef4830603 529 #define REG_MACRO_0 3154136UL
cpm219 0:2d0ef4830603 530 #define REG_MACRO_1 3154140UL
cpm219 0:2d0ef4830603 531 #define REG_MEDIAFIFO_READ 3182612UL
cpm219 0:2d0ef4830603 532 #define REG_MEDIAFIFO_WRITE 3182616UL
cpm219 0:2d0ef4830603 533 #define REG_OUTBITS 3154012UL
cpm219 0:2d0ef4830603 534 #define REG_PATCHED_ANALOG 3154288UL
cpm219 0:2d0ef4830603 535 #define REG_PATCHED_TOUCH_FAULT 3154284UL
cpm219 0:2d0ef4830603 536 #define REG_PCLK 3154032UL
cpm219 0:2d0ef4830603 537 #define REG_PCLK_POL 3154028UL
cpm219 0:2d0ef4830603 538 #define REG_PLAY 3154060UL
cpm219 0:2d0ef4830603 539 #define REG_PLAYBACK_FORMAT 3154116UL
cpm219 0:2d0ef4830603 540 #define REG_PLAYBACK_FREQ 3154112UL
cpm219 0:2d0ef4830603 541 #define REG_PLAYBACK_LENGTH 3154104UL
cpm219 0:2d0ef4830603 542 #define REG_PLAYBACK_LOOP 3154120UL
cpm219 0:2d0ef4830603 543 #define REG_PLAYBACK_PLAY 3154124UL
cpm219 0:2d0ef4830603 544 #define REG_PLAYBACK_READPTR 3154108UL
cpm219 0:2d0ef4830603 545 #define REG_PLAYBACK_START 3154100UL
cpm219 0:2d0ef4830603 546 #define REG_PWM_DUTY 3154132UL
cpm219 0:2d0ef4830603 547 #define REG_PWM_HZ 3154128UL
cpm219 0:2d0ef4830603 548 #define REG_RENDERMODE 3153936UL
cpm219 0:2d0ef4830603 549 #define REG_ROMSUB_SEL 3154160UL
cpm219 0:2d0ef4830603 550 #define REG_ROTATE 3154008UL
cpm219 0:2d0ef4830603 551 #define REG_SNAPFORMAT 3153948UL
cpm219 0:2d0ef4830603 552 #define REG_SNAPSHOT 3153944UL
cpm219 0:2d0ef4830603 553 #define REG_SNAPY 3153940UL
cpm219 0:2d0ef4830603 554 #define REG_SOUND 3154056UL
cpm219 0:2d0ef4830603 555 #define REG_SPI_EARLY_TX 3154300UL
cpm219 0:2d0ef4830603 556 #define REG_SPI_WIDTH 3154312UL
cpm219 0:2d0ef4830603 557 #define REG_SWIZZLE 3154020UL
cpm219 0:2d0ef4830603 558 #define REG_TAG 3154044UL
cpm219 0:2d0ef4830603 559 #define REG_TAG_X 3154036UL
cpm219 0:2d0ef4830603 560 #define REG_TAG_Y 3154040UL
cpm219 0:2d0ef4830603 561 #define REG_TAP_CRC 3153956UL
cpm219 0:2d0ef4830603 562 #define REG_TAP_MASK 3153960UL
cpm219 0:2d0ef4830603 563 #define REG_TOUCH_ADC_MODE 3154184UL
cpm219 0:2d0ef4830603 564 #define REG_TOUCH_CHARGE 3154188UL
cpm219 0:2d0ef4830603 565 #define REG_TOUCH_DIRECT_XY 3154316UL
cpm219 0:2d0ef4830603 566 #define REG_TOUCH_DIRECT_Z1Z2 3154320UL
cpm219 0:2d0ef4830603 567 #define REG_TOUCH_FAULT 3154288UL
cpm219 0:2d0ef4830603 568 #define REG_TOUCH_MODE 3154180UL
cpm219 0:2d0ef4830603 569 #define REG_TOUCH_OVERSAMPLE 3154196UL
cpm219 0:2d0ef4830603 570 #define REG_TOUCH_RAW_XY 3154204UL
cpm219 0:2d0ef4830603 571 #define REG_TOUCH_RZ 3154208UL
cpm219 0:2d0ef4830603 572 #define REG_TOUCH_RZTHRESH 3154200UL
cpm219 0:2d0ef4830603 573 #define REG_TOUCH_SCREEN_XY 3154212UL
cpm219 0:2d0ef4830603 574 #define REG_TOUCH_SETTLE 3154192UL
cpm219 0:2d0ef4830603 575 #define REG_TOUCH_TAG 3154220UL
cpm219 0:2d0ef4830603 576 #define REG_TOUCH_TAG1 3154228UL
cpm219 0:2d0ef4830603 577 #define REG_TOUCH_TAG1_XY 3154224UL
cpm219 0:2d0ef4830603 578 #define REG_TOUCH_TAG2 3154236UL
cpm219 0:2d0ef4830603 579 #define REG_TOUCH_TAG2_XY 3154232UL
cpm219 0:2d0ef4830603 580 #define REG_TOUCH_TAG3 3154244UL
cpm219 0:2d0ef4830603 581 #define REG_TOUCH_TAG3_XY 3154240UL
cpm219 0:2d0ef4830603 582 #define REG_TOUCH_TAG4 3154252UL
cpm219 0:2d0ef4830603 583 #define REG_TOUCH_TAG4_XY 3154248UL
cpm219 0:2d0ef4830603 584 #define REG_TOUCH_TAG_XY 3154216UL
cpm219 0:2d0ef4830603 585 #define REG_TOUCH_TRANSFORM_A 3154256UL
cpm219 0:2d0ef4830603 586 #define REG_TOUCH_TRANSFORM_B 3154260UL
cpm219 0:2d0ef4830603 587 #define REG_TOUCH_TRANSFORM_C 3154264UL
cpm219 0:2d0ef4830603 588 #define REG_TOUCH_TRANSFORM_D 3154268UL
cpm219 0:2d0ef4830603 589 #define REG_TOUCH_TRANSFORM_E 3154272UL
cpm219 0:2d0ef4830603 590 #define REG_TOUCH_TRANSFORM_F 3154276UL
cpm219 0:2d0ef4830603 591 #define REG_TRACKER 3182592UL
cpm219 0:2d0ef4830603 592 #define REG_TRACKER_1 3182596UL
cpm219 0:2d0ef4830603 593 #define REG_TRACKER_2 3182600UL
cpm219 0:2d0ef4830603 594 #define REG_TRACKER_3 3182604UL
cpm219 0:2d0ef4830603 595 #define REG_TRACKER_4 3182608UL
cpm219 0:2d0ef4830603 596 #define REG_TRIM 3154304UL
cpm219 0:2d0ef4830603 597 #define REG_VCYCLE 3153984UL
cpm219 0:2d0ef4830603 598 #define REG_VOFFSET 3153988UL
cpm219 0:2d0ef4830603 599 #define REG_VOL_PB 3154048UL
cpm219 0:2d0ef4830603 600 #define REG_VOL_SOUND 3154052UL
cpm219 0:2d0ef4830603 601 #define REG_VSIZE 3153992UL
cpm219 0:2d0ef4830603 602 #define REG_VSYNC0 3153996UL
cpm219 0:2d0ef4830603 603 #define REG_VSYNC1 3154000UL
JackB 10:6a81aeca25e3 604
JackB 10:6a81aeca25e3 605 #define REG_TOUCH_CONFIG 3154280UL // Jack
JackB 10:6a81aeca25e3 606 #define VAL_TOUCH_CONFIG 0x0381
cpm219 0:2d0ef4830603 607 #define REPEAT 1UL
cpm219 0:2d0ef4830603 608 #define REPLACE 2UL
JackB 10:6a81aeca25e3 609 #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
JackB 10:6a81aeca25e3 610 #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
cpm219 0:2d0ef4830603 611 #define SRC_ALPHA 2UL
JackB 10:6a81aeca25e3 612 #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
JackB 10:6a81aeca25e3 613 #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
cpm219 0:2d0ef4830603 614 #define TOUCHMODE_CONTINUOUS 3UL
cpm219 0:2d0ef4830603 615 #define TOUCHMODE_FRAME 2UL
cpm219 0:2d0ef4830603 616 #define TOUCHMODE_OFF 0UL
cpm219 0:2d0ef4830603 617 #define TOUCHMODE_ONESHOT 1UL
cpm219 0:2d0ef4830603 618 #define ULAW_SAMPLES 1UL
cpm219 0:2d0ef4830603 619 #define ZERO 0UL
cpm219 0:2d0ef4830603 620 #define VERTEX2F(x,y) ((1UL<<30)|(((x)&32767UL)<<15)|(((y)&32767UL)<<0))
cpm219 0:2d0ef4830603 621 #define VERTEX2II(x,y,handle,cell) ((2UL<<30)|(((x)&511UL)<<21)|(((y)&511UL)<<12)|(((handle)&31UL)<<7)|(((cell)&127UL)<<0))
cpm219 0:2d0ef4830603 622 #define BITMAP_SOURCE(addr) ((1UL<<24)|(((addr)&4194303UL)<<0))
cpm219 0:2d0ef4830603 623 #define CLEAR_COLOR_RGB(red,green,blue) ((2UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0))
cpm219 0:2d0ef4830603 624 #define TAG(s) ((3UL<<24)|(((s)&255UL)<<0))
cpm219 0:2d0ef4830603 625 #define COLOR_RGB(red,green,blue) ((4UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0))
cpm219 0:2d0ef4830603 626 #define BITMAP_HANDLE(handle) ((5UL<<24)|(((handle)&31UL)<<0))
cpm219 0:2d0ef4830603 627 #define CELL(cell) ((6UL<<24)|(((cell)&127UL)<<0))
cpm219 0:2d0ef4830603 628 #define BITMAP_LAYOUT(format,linestride,height) ((7UL<<24)|(((format)&31UL)<<19)|(((linestride)&1023UL)<<9)|(((height)&511UL)<<0))
JackB 10:6a81aeca25e3 629 #define BITMAP_LAYOUT_H(linestride,height) ((40UL<<24)|(((linestride)&3UL)<<2)|(((height)&3UL)<<0))
cpm219 0:2d0ef4830603 630 #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))
JackB 10:6a81aeca25e3 631 #define BITMAP_SIZE_H(width,height) ((41UL<<24)|(((width)&3UL)<<2)|(((height)&3UL)<<0))
cpm219 0:2d0ef4830603 632 #define ALPHA_FUNC(func,ref) ((9UL<<24)|(((func)&7UL)<<8)|(((ref)&255UL)<<0))
cpm219 0:2d0ef4830603 633 #define STENCIL_FUNC(func,ref,mask) ((10UL<<24)|(((func)&7UL)<<16)|(((ref)&255UL)<<8)|(((mask)&255UL)<<0))
cpm219 0:2d0ef4830603 634 #define BLEND_FUNC(src,dst) ((11UL<<24)|(((src)&7UL)<<3)|(((dst)&7UL)<<0))
cpm219 0:2d0ef4830603 635 #define STENCIL_OP(sfail,spass) ((12UL<<24)|(((sfail)&7UL)<<3)|(((spass)&7UL)<<0))
cpm219 0:2d0ef4830603 636 #define POINT_SIZE(size) ((13UL<<24)|(((size)&8191UL)<<0))
cpm219 0:2d0ef4830603 637 #define LINE_WIDTH(width) ((14UL<<24)|(((width)&4095UL)<<0))
cpm219 0:2d0ef4830603 638 #define CLEAR_COLOR_A(alpha) ((15UL<<24)|(((alpha)&255UL)<<0))
cpm219 0:2d0ef4830603 639 #define COLOR_A(alpha) ((16UL<<24)|(((alpha)&255UL)<<0))
cpm219 0:2d0ef4830603 640 #define CLEAR_STENCIL(s) ((17UL<<24)|(((s)&255UL)<<0))
cpm219 0:2d0ef4830603 641 #define CLEAR_TAG(s) ((18UL<<24)|(((s)&255UL)<<0))
cpm219 0:2d0ef4830603 642 #define STENCIL_MASK(mask) ((19UL<<24)|(((mask)&255UL)<<0))
cpm219 0:2d0ef4830603 643 #define TAG_MASK(mask) ((20UL<<24)|(((mask)&1UL)<<0))
cpm219 0:2d0ef4830603 644 #define BITMAP_TRANSFORM_A(a) ((21UL<<24)|(((a)&131071UL)<<0))
cpm219 0:2d0ef4830603 645 #define BITMAP_TRANSFORM_B(b) ((22UL<<24)|(((b)&131071UL)<<0))
cpm219 0:2d0ef4830603 646 #define BITMAP_TRANSFORM_C(c) ((23UL<<24)|(((c)&16777215UL)<<0))
cpm219 0:2d0ef4830603 647 #define BITMAP_TRANSFORM_D(d) ((24UL<<24)|(((d)&131071UL)<<0))
cpm219 0:2d0ef4830603 648 #define BITMAP_TRANSFORM_E(e) ((25UL<<24)|(((e)&131071UL)<<0))
cpm219 0:2d0ef4830603 649 #define BITMAP_TRANSFORM_F(f) ((26UL<<24)|(((f)&16777215UL)<<0))
cpm219 0:2d0ef4830603 650 #define SCISSOR_XY(x,y) ((27UL<<24)|(((x)&2047UL)<<11)|(((y)&2047UL)<<0))
cpm219 0:2d0ef4830603 651 #define SCISSOR_SIZE(width,height) ((28UL<<24)|(((width)&4095UL)<<12)|(((height)&4095UL)<<0))
cpm219 0:2d0ef4830603 652 #define CALL(dest) ((29UL<<24)|(((dest)&65535UL)<<0))
cpm219 0:2d0ef4830603 653 #define JUMP(dest) ((30UL<<24)|(((dest)&65535UL)<<0))
cpm219 0:2d0ef4830603 654 #define BEGIN(prim) ((31UL<<24)|(((prim)&15UL)<<0))
cpm219 0:2d0ef4830603 655 #define COLOR_MASK(r,g,b,a) ((32UL<<24)|(((r)&1UL)<<3)|(((g)&1UL)<<2)|(((b)&1UL)<<1)|(((a)&1UL)<<0))
cpm219 0:2d0ef4830603 656 #define CLEAR(c,s,t) ((38UL<<24)|(((c)&1UL)<<2)|(((s)&1UL)<<1)|(((t)&1UL)<<0))
cpm219 0:2d0ef4830603 657 #define VERTEX_FORMAT(frac) ((39UL<<24)|(((frac)&7UL)<<0))
cpm219 0:2d0ef4830603 658 #define PALETTE_SOURCE(addr) ((42UL<<24)|(((addr)&4194303UL)<<0))
cpm219 0:2d0ef4830603 659 #define VERTEX_TRANSLATE_X(x) ((43UL<<24)|(((x)&131071UL)<<0))
cpm219 0:2d0ef4830603 660 #define VERTEX_TRANSLATE_Y(y) ((44UL<<24)|(((y)&131071UL)<<0))
cpm219 0:2d0ef4830603 661 #define NOP() ((45UL<<24))
cpm219 0:2d0ef4830603 662 #define END() ((33UL<<24))
cpm219 0:2d0ef4830603 663 #define SAVE_CONTEXT() ((34UL<<24))
cpm219 0:2d0ef4830603 664 #define RESTORE_CONTEXT() ((35UL<<24))
cpm219 0:2d0ef4830603 665 #define RETURN() ((36UL<<24))
cpm219 0:2d0ef4830603 666 #define MACRO(m) ((37UL<<24)|(((m)&1UL)<<0))
cpm219 0:2d0ef4830603 667 #define DISPLAY() ((0UL<<24))
cpm219 0:2d0ef4830603 668 #endif
cpm219 0:2d0ef4830603 669
cpm219 0:2d0ef4830603 670 #define FT_GPU_NUMCHAR_PERFONT (128)
cpm219 0:2d0ef4830603 671 #define FT_GPU_FONT_TABLE_SIZE (148)
cpm219 0:2d0ef4830603 672
cpm219 0:2d0ef4830603 673 /* FT81x and FT80x font table structure */
cpm219 0:2d0ef4830603 674 /* Font table address in ROM can be found by reading the address from 0xFFFFC location. */
cpm219 0:2d0ef4830603 675 /* 16 font tables are present at the address read from location 0xFFFFC */
cpm219 0:2d0ef4830603 676 typedef struct FT_Gpu_Fonts
cpm219 0:2d0ef4830603 677 {
cpm219 0:2d0ef4830603 678 /* All the values are in bytes */
cpm219 0:2d0ef4830603 679 /* Width of each character font from 0 to 127 */
cpm219 0:2d0ef4830603 680 ft_uint8_t FontWidth[FT_GPU_NUMCHAR_PERFONT];
cpm219 0:2d0ef4830603 681 /* Bitmap format of font wrt bitmap formats supported by FT800 - L1, L4, L8 */
cpm219 0:2d0ef4830603 682 ft_uint32_t FontBitmapFormat;
cpm219 0:2d0ef4830603 683 /* Font line stride in FT800 ROM */
cpm219 0:2d0ef4830603 684 ft_uint32_t FontLineStride;
cpm219 0:2d0ef4830603 685 /* Font width in pixels */
cpm219 0:2d0ef4830603 686 ft_uint32_t FontWidthInPixels;
cpm219 0:2d0ef4830603 687 /* Font height in pixels */
cpm219 0:2d0ef4830603 688 ft_uint32_t FontHeightInPixels;
cpm219 0:2d0ef4830603 689 /* Pointer to font graphics raw data */
cpm219 0:2d0ef4830603 690 ft_uint32_t PointerToFontGraphicsData;
cpm219 0:2d0ef4830603 691 }FT_Gpu_Fonts_t;
cpm219 0:2d0ef4830603 692
cpm219 0:2d0ef4830603 693 /* Nothing beyond this */