Library for FTDI FT800, Support up to 512 x 512 pixel resolution.

Dependents:   FT800-Demo-Sliders FT800-Clock FT800-Demo-Bitmap

Hardware

https://os.mbed.com/media/uploads/nz/display-43.jpg

Info

Committer:
nz
Date:
Wed Dec 30 17:12:59 2020 +0000
Revision:
5:b28ce8616b41
Parent:
3:513297422037
update

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nz 0:b699e59d925b 1 /* mbed Library for FTDI FT800 */
nz 0:b699e59d925b 2
nz 0:b699e59d925b 3 #ifndef FT800_REGISTERS_H
nz 0:b699e59d925b 4 #define FT800_REGISTERS_H
nz 0:b699e59d925b 5
nz 0:b699e59d925b 6 #include "mbed.h"
nz 0:b699e59d925b 7
nz 3:513297422037 8 /* LCD colors */
nz 3:513297422037 9 #define BLACK ((uint32_t)0x000000)
nz 3:513297422037 10 #define BLUE ((uint32_t)0x0000FF)
nz 3:513297422037 11 #define GREEN ((uint32_t)0x00FF00)
nz 3:513297422037 12 #define CYAN ((uint32_t)0x00FFFF)
nz 3:513297422037 13 #define RED ((uint32_t)0xFF0000)
nz 3:513297422037 14 #define MAGENTA ((uint32_t)0xFF00FF)
nz 3:513297422037 15 #define YELLOW ((uint32_t)0xFFFF00)
nz 3:513297422037 16 #define WHITE ((uint32_t)0xFFFFFF)
nz 0:b699e59d925b 17
nz 3:513297422037 18 #define LIGHTBLUE ((uint32_t)0x8080FF)
nz 3:513297422037 19 #define LIGHTGREEN ((uint32_t)0x80FF80)
nz 3:513297422037 20 #define LIGHTRED ((uint32_t)0xFF8080)
nz 3:513297422037 21 #define LIGHTCYAN ((uint32_t)0x80FFFF)
nz 3:513297422037 22 #define LIGHTMAGENTA ((uint32_t)0xFF80FF)
nz 3:513297422037 23 #define LIGHTYELLOW ((uint32_t)0xFFFF80)
nz 3:513297422037 24 #define DARKBLUE ((uint32_t)0x000080)
nz 3:513297422037 25 #define DARKGREEN ((uint32_t)0x008000)
nz 3:513297422037 26 #define DARKRED ((uint32_t)0x800000)
nz 3:513297422037 27 #define DARKCYAN ((uint32_t)0x008080)
nz 3:513297422037 28 #define DARKMAGENTA ((uint32_t)0x800080)
nz 3:513297422037 29 #define DARKYELLOW ((uint32_t)0x808000)
nz 3:513297422037 30 #define GRAY ((uint32_t)0x808080)
nz 0:b699e59d925b 31
nz 3:513297422037 32 #define WHITESMOKE ((uint32_t)0xF5F5F5)
nz 3:513297422037 33 #define GAINSBORO ((uint32_t)0xDCDCDC)
nz 3:513297422037 34 #define LIGHTGREY ((uint32_t)0xD3D3D3)
nz 3:513297422037 35 #define SILVER ((uint32_t)0xC0C0C0)
nz 3:513297422037 36 #define DARKGRAY ((uint32_t)0xA9A9A9)
nz 3:513297422037 37 #define DIMGRAY ((uint32_t)0x696969)
nz 0:b699e59d925b 38
nz 0:b699e59d925b 39
nz 0:b699e59d925b 40 /* Definitions used for FT800 co processor command buffer */
nz 3:513297422037 41 #define FT_DL_SIZE (8*1024) //8KB Display List buffer size
nz 3:513297422037 42 #define FT_CMD_FIFO_SIZE (4*1024) //4KB coprocessor Fifo size
nz 3:513297422037 43 #define FT_CMD_SIZE (4) //4 byte per coprocessor command of EVE
nz 0:b699e59d925b 44
nz 0:b699e59d925b 45 // GPU
nz 0:b699e59d925b 46 #define GPU_INTERNAL_OSC 0x48 //default
nz 0:b699e59d925b 47 #define GPU_EXTERNAL_OSC 0x44
nz 0:b699e59d925b 48 //#define GPU_PLL_24M 0x64
nz 0:b699e59d925b 49 #define GPU_PLL_36M 0x61
nz 0:b699e59d925b 50 #define GPU_PLL_48M 0x62 //default
nz 0:b699e59d925b 51 #define GPU_ACTIVE_M 0x00
nz 0:b699e59d925b 52 #define GPU_STANDBY_M 0x41 //default
nz 0:b699e59d925b 53 #define GPU_SLEEP_M 0x42
nz 0:b699e59d925b 54 #define GPU_POWERDOWN_M 0x50
nz 0:b699e59d925b 55 #define GPU_CORE_RESET 0x68
nz 0:b699e59d925b 56
nz 0:b699e59d925b 57 // CMD
nz 0:b699e59d925b 58 #define CMDBUF_SIZE 4096UL
nz 0:b699e59d925b 59 #define CMD_APPEND 4294967070UL
nz 0:b699e59d925b 60 #define CMD_BGCOLOR 4294967049UL
nz 0:b699e59d925b 61 #define CMD_BITMAP_TRANSFORM 4294967073UL
nz 0:b699e59d925b 62 #define CMD_BUTTON 4294967053UL
nz 0:b699e59d925b 63 #define CMD_CALIBRATE 4294967061UL
nz 0:b699e59d925b 64 #define CMD_CLOCK 4294967060UL
nz 0:b699e59d925b 65 #define CMD_COLDSTART 4294967090UL
nz 0:b699e59d925b 66 #define CMD_CRC 4294967043UL
nz 0:b699e59d925b 67 #define CMD_DIAL 4294967085UL
nz 0:b699e59d925b 68 #define CMD_DLSTART 4294967040UL
nz 0:b699e59d925b 69 #define CMD_EXECUTE 4294967047UL
nz 0:b699e59d925b 70 #define CMD_FGCOLOR 4294967050UL
nz 0:b699e59d925b 71 #define CMD_GAUGE 4294967059UL
nz 0:b699e59d925b 72 #define CMD_GETMATRIX 4294967091UL
nz 0:b699e59d925b 73 #define CMD_GETPOINT 4294967048UL
nz 0:b699e59d925b 74 #define CMD_GETPROPS 4294967077UL
nz 0:b699e59d925b 75 #define CMD_GETPTR 4294967075UL
nz 0:b699e59d925b 76 #define CMD_GRADCOLOR 4294967092UL
nz 0:b699e59d925b 77 #define CMD_GRADIENT 4294967051UL
nz 0:b699e59d925b 78 #define CMD_HAMMERAUX 4294967044UL
nz 0:b699e59d925b 79 #define CMD_IDCT 4294967046UL
nz 0:b699e59d925b 80 #define CMD_INFLATE 4294967074UL
nz 0:b699e59d925b 81 #define CMD_INTERRUPT 4294967042UL
nz 0:b699e59d925b 82 #define CMD_KEYS 4294967054UL
nz 0:b699e59d925b 83 #define CMD_LOADIDENTITY 4294967078UL
nz 0:b699e59d925b 84 #define CMD_LOADIMAGE 4294967076UL
nz 0:b699e59d925b 85 #define CMD_LOGO 4294967089UL
nz 0:b699e59d925b 86 #define CMD_MARCH 4294967045UL
nz 0:b699e59d925b 87 #define CMD_MEMCPY 4294967069UL
nz 0:b699e59d925b 88 #define CMD_MEMCRC 4294967064UL
nz 0:b699e59d925b 89 #define CMD_MEMSET 4294967067UL
nz 0:b699e59d925b 90 #define CMD_MEMWRITE 4294967066UL
nz 0:b699e59d925b 91 #define CMD_MEMZERO 4294967068UL
nz 0:b699e59d925b 92 #define CMD_NUMBER 4294967086UL
nz 0:b699e59d925b 93 #define CMD_PROGRESS 4294967055UL
nz 0:b699e59d925b 94 #define CMD_REGREAD 4294967065UL
nz 0:b699e59d925b 95 #define CMD_ROTATE 4294967081UL
nz 0:b699e59d925b 96 #define CMD_SCALE 4294967080UL
nz 0:b699e59d925b 97 #define CMD_SCREENSAVER 4294967087UL
nz 0:b699e59d925b 98 #define CMD_SCROLLBAR 4294967057UL
nz 0:b699e59d925b 99 #define CMD_SETFONT 4294967083UL
nz 0:b699e59d925b 100 #define CMD_SETMATRIX 4294967082UL
nz 0:b699e59d925b 101 #define CMD_SKETCH 4294967088UL
nz 0:b699e59d925b 102 #define CMD_SLIDER 4294967056UL
nz 0:b699e59d925b 103 #define CMD_SNAPSHOT 4294967071UL
nz 0:b699e59d925b 104 #define CMD_SPINNER 4294967062UL
nz 0:b699e59d925b 105 #define CMD_STOP 4294967063UL
nz 0:b699e59d925b 106 #define CMD_SWAP 4294967041UL
nz 0:b699e59d925b 107 #define CMD_TEXT 4294967052UL
nz 0:b699e59d925b 108 #define CMD_TOGGLE 4294967058UL
nz 0:b699e59d925b 109 #define CMD_TOUCH_TRANSFORM 4294967072UL
nz 0:b699e59d925b 110 #define CMD_TRACK 4294967084UL
nz 0:b699e59d925b 111 #define CMD_TRANSLATE 4294967079UL
nz 0:b699e59d925b 112
nz 0:b699e59d925b 113 // RAM
nz 0:b699e59d925b 114 #define RAM_CMD 1081344UL
nz 0:b699e59d925b 115 #define RAM_DL 1048576UL
nz 0:b699e59d925b 116 #define RAM_G 0UL
nz 0:b699e59d925b 117 #define RAM_PAL 1056768UL
nz 0:b699e59d925b 118 #define RAM_REG 1057792UL
nz 0:b699e59d925b 119
nz 0:b699e59d925b 120 // REGs
nz 0:b699e59d925b 121 #define REG_ANALOG 1058104UL
nz 0:b699e59d925b 122 #define REG_ANA_COMP 1058160UL
nz 0:b699e59d925b 123 #define REG_CLOCK 1057800UL
nz 0:b699e59d925b 124 #define REG_CMD_DL 1058028UL
nz 0:b699e59d925b 125 #define REG_CMD_READ 1058020UL
nz 0:b699e59d925b 126 #define REG_CMD_WRITE 1058024UL
nz 0:b699e59d925b 127 #define REG_CPURESET 1057820UL
nz 0:b699e59d925b 128 #define REG_CRC 1058152UL
nz 0:b699e59d925b 129 #define REG_CSPREAD 1057892UL
nz 0:b699e59d925b 130 #define REG_CYA0 1058000UL
nz 0:b699e59d925b 131 #define REG_CYA1 1058004UL
nz 0:b699e59d925b 132 #define REG_CYA_TOUCH 1058100UL
nz 0:b699e59d925b 133 #define REG_DATESTAMP 1058108UL
nz 0:b699e59d925b 134 #define REG_DITHER 1057884UL
nz 0:b699e59d925b 135 #define REG_DLSWAP 1057872UL
nz 0:b699e59d925b 136 #define REG_FRAMES 1057796UL
nz 0:b699e59d925b 137 #define REG_FREQUENCY 1057804UL
nz 0:b699e59d925b 138 #define REG_GPIO 1057936UL
nz 0:b699e59d925b 139 #define REG_GPIO_DIR 1057932UL
nz 0:b699e59d925b 140 #define REG_HCYCLE 1057832UL
nz 0:b699e59d925b 141 #define REG_HOFFSET 1057836UL
nz 0:b699e59d925b 142 #define REG_HSIZE 1057840UL
nz 0:b699e59d925b 143 #define REG_HSYNC0 1057844UL
nz 0:b699e59d925b 144 #define REG_HSYNC1 1057848UL
nz 0:b699e59d925b 145 #define REG_ID 1057792UL
nz 0:b699e59d925b 146 #define REG_INT_EN 1057948UL
nz 0:b699e59d925b 147 #define REG_INT_FLAGS 1057944UL
nz 0:b699e59d925b 148 #define REG_INT_MASK 1057952UL
nz 0:b699e59d925b 149 #define REG_MACRO_0 1057992UL
nz 0:b699e59d925b 150 #define REG_MACRO_1 1057996UL
nz 0:b699e59d925b 151 #define REG_OUTBITS 1057880UL
nz 0:b699e59d925b 152 #define REG_PCLK 1057900UL
nz 0:b699e59d925b 153 #define REG_PCLK_POL 1057896UL
nz 0:b699e59d925b 154 #define REG_PLAY 1057928UL
nz 0:b699e59d925b 155 #define REG_PLAYBACK_FORMAT 1057972UL
nz 0:b699e59d925b 156 #define REG_PLAYBACK_FREQ 1057968UL
nz 0:b699e59d925b 157 #define REG_PLAYBACK_LENGTH 1057960UL
nz 0:b699e59d925b 158 #define REG_PLAYBACK_LOOP 1057976UL
nz 0:b699e59d925b 159 #define REG_PLAYBACK_PLAY 1057980UL
nz 0:b699e59d925b 160 #define REG_PLAYBACK_READPTR 1057964UL
nz 0:b699e59d925b 161 #define REG_PLAYBACK_START 1057956UL
nz 0:b699e59d925b 162 #define REG_PWM_DUTY 1057988UL
nz 0:b699e59d925b 163 #define REG_PWM_HZ 1057984UL
nz 0:b699e59d925b 164 #define REG_RENDERMODE 1057808UL
nz 0:b699e59d925b 165 #define REG_ROMSUB_SEL 1058016UL
nz 0:b699e59d925b 166 #define REG_ROTATE 1057876UL
nz 0:b699e59d925b 167 #define REG_SNAPSHOT 1057816UL
nz 0:b699e59d925b 168 #define REG_SNAPY 1057812UL
nz 0:b699e59d925b 169 #define REG_SOUND 1057924UL
nz 0:b699e59d925b 170 #define REG_SWIZZLE 1057888UL
nz 0:b699e59d925b 171 #define REG_TAG 1057912UL
nz 0:b699e59d925b 172 #define REG_TAG_X 1057904UL
nz 0:b699e59d925b 173 #define REG_TAG_Y 1057908UL
nz 0:b699e59d925b 174 #define REG_TAP_CRC 1057824UL
nz 0:b699e59d925b 175 #define REG_TAP_MASK 1057828UL
nz 0:b699e59d925b 176 #define REG_TOUCH_ADC_MODE 1058036UL
nz 0:b699e59d925b 177 #define REG_TOUCH_CHARGE 1058040UL
nz 0:b699e59d925b 178 #define REG_TOUCH_DIRECT_XY 1058164UL
nz 0:b699e59d925b 179 #define REG_TOUCH_DIRECT_Z1Z2 1058168UL
nz 0:b699e59d925b 180 #define REG_TOUCH_MODE 1058032UL
nz 0:b699e59d925b 181 #define REG_TOUCH_OVERSAMPLE 1058048UL
nz 0:b699e59d925b 182 #define REG_TOUCH_RAW_XY 1058056UL
nz 0:b699e59d925b 183 #define REG_TOUCH_RZ 1058060UL
nz 0:b699e59d925b 184 #define REG_TOUCH_RZTHRESH 1058052UL
nz 0:b699e59d925b 185 #define REG_TOUCH_SCREEN_XY 1058064UL
nz 0:b699e59d925b 186 #define REG_TOUCH_SETTLE 1058044UL
nz 0:b699e59d925b 187 #define REG_TOUCH_TAG 1058072UL
nz 0:b699e59d925b 188 #define REG_TOUCH_TAG_XY 1058068UL
nz 0:b699e59d925b 189 #define REG_TOUCH_TRANSFORM_A 1058076UL
nz 0:b699e59d925b 190 #define REG_TOUCH_TRANSFORM_B 1058080UL
nz 0:b699e59d925b 191 #define REG_TOUCH_TRANSFORM_C 1058084UL
nz 0:b699e59d925b 192 #define REG_TOUCH_TRANSFORM_D 1058088UL
nz 0:b699e59d925b 193 #define REG_TOUCH_TRANSFORM_E 1058092UL
nz 0:b699e59d925b 194 #define REG_TOUCH_TRANSFORM_F 1058096UL
nz 0:b699e59d925b 195 #define REG_TRACKER 1085440UL
nz 0:b699e59d925b 196 #define REG_TRIM 1058156UL
nz 0:b699e59d925b 197 #define REG_VCYCLE 1057852UL
nz 0:b699e59d925b 198 #define REG_VOFFSET 1057856UL
nz 0:b699e59d925b 199 #define REG_VOL_PB 1057916UL
nz 0:b699e59d925b 200 #define REG_VOL_SOUND 1057920UL
nz 0:b699e59d925b 201 #define REG_VSIZE 1057860UL
nz 0:b699e59d925b 202 #define REG_VSYNC0 1057864UL
nz 0:b699e59d925b 203 #define REG_VSYNC1 1057868UL
nz 0:b699e59d925b 204
nz 0:b699e59d925b 205 // OPTIONS
nz 0:b699e59d925b 206 #define OPT_3D 0UL
nz 0:b699e59d925b 207 #define OPT_RGB565 0UL
nz 0:b699e59d925b 208 #define OPT_CENTER 1536UL
nz 0:b699e59d925b 209 #define OPT_CENTERX 512UL
nz 0:b699e59d925b 210 #define OPT_CENTERY 1024UL
nz 0:b699e59d925b 211 #define OPT_FLAT 256UL
nz 0:b699e59d925b 212 #define OPT_MONO 1UL
nz 0:b699e59d925b 213 #define OPT_NOBACK 4096UL
nz 0:b699e59d925b 214 #define OPT_NODL 2UL
nz 0:b699e59d925b 215 #define OPT_NOHANDS 49152UL
nz 0:b699e59d925b 216 #define OPT_NOHM 16384UL
nz 0:b699e59d925b 217 #define OPT_NOPOINTER 16384UL
nz 0:b699e59d925b 218 #define OPT_NOSECS 32768UL
nz 0:b699e59d925b 219 #define OPT_NOTICKS 8192UL
nz 0:b699e59d925b 220 #define OPT_RIGHTX 2048UL
nz 0:b699e59d925b 221 #define OPT_SIGNED 256UL
nz 0:b699e59d925b 222
nz 0:b699e59d925b 223 // CLEAR FLAGS
nz 0:b699e59d925b 224 #define CLEAR_TAG 0x01
nz 0:b699e59d925b 225 #define CLEAR_STENCIL 0x02
nz 0:b699e59d925b 226 #define CLEAR_COLOR 0x04
nz 0:b699e59d925b 227 #define CLEAR_ALL 0x07
nz 0:b699e59d925b 228
nz 0:b699e59d925b 229 // BITMAMAP TRANSFORMATION
nz 0:b699e59d925b 230 //#define BMP_TRANSFORM_A 0x15000000
nz 0:b699e59d925b 231 //#define BMP_TRANSFORM_B 0x16000000
nz 0:b699e59d925b 232 //#define BMP_TRANSFORM_C 0x17000000
nz 0:b699e59d925b 233 //#define BMP_TRANSFORM_D 0x18000000
nz 0:b699e59d925b 234 //#define BMP_TRANSFORM_E 0x19000000
nz 0:b699e59d925b 235 //#define BMP_TRANSFORM_F 0x1A000000
nz 0:b699e59d925b 236
nz 0:b699e59d925b 237 // BITMAP FILTERING
nz 0:b699e59d925b 238 #define NEAREST 0
nz 0:b699e59d925b 239 #define BILINEAR 1
nz 0:b699e59d925b 240
nz 0:b699e59d925b 241 // BITMAP WRAP MODE
nz 0:b699e59d925b 242 #define BORDER 0
nz 0:b699e59d925b 243 #define REPEAT 1
nz 0:b699e59d925b 244
nz 0:b699e59d925b 245 // BITMAP_LAYOUT
nz 0:b699e59d925b 246 #define ARGB1555 0
nz 0:b699e59d925b 247 #define L1 1
nz 0:b699e59d925b 248 #define L4 2
nz 0:b699e59d925b 249 #define L8 3
nz 0:b699e59d925b 250 #define RGB332 4
nz 0:b699e59d925b 251 #define ARGB2 5
nz 0:b699e59d925b 252 #define ARGB4 6
nz 0:b699e59d925b 253 #define RGB565 7
nz 0:b699e59d925b 254 #define PALETTED 8
nz 0:b699e59d925b 255 #define TEXT8X8 9
nz 0:b699e59d925b 256 #define TEXTVGA 10
nz 0:b699e59d925b 257 #define BARGRAPH 11
nz 0:b699e59d925b 258
nz 0:b699e59d925b 259
nz 0:b699e59d925b 260 //
nz 0:b699e59d925b 261 #define ADREAD 0x00
nz 0:b699e59d925b 262 #define ADWRITE 0x80
nz 0:b699e59d925b 263
nz 0:b699e59d925b 264 #endif /* #ifndef FT800_REGISTERS_H */