Lib for FTDI FT800 Graphic Controller EVE Support up to 512 x 512 pixel resolution. Resistive touch sense Mono audio output SPI Interface
Dependents: FT800_touch_track FT800_JPG
Library for the FT800 Display,Audio and Touch Controller from FTDI. The Code is based on the sample code from FTDI.
FT800 is a graphics chip with added features such as audio playback and touch capabilities. FT800 graphics consist of a rich set of graphics objects (primitive and widgets) that can be used for displaying various menus and screen shots.
http://www.ftdichip.com/Products/ICs/FT800.html
The mbed is talking thru the SPI interface with the graphic engine. We have to set up a list of Commands and send them to the FT800 to get graphics.
Hardware
1. VM800C development modules from FTDI : http://www.ftdichip.com/Products/Modules/VM800C.html
The modules come with different size lcd. 3.5", 4.3" or 5" or without. The picture shows a modified board, because my lcd had a different pinout. The mbed is connected to the pin header on the bottom.
2. EVBEVE-FT800 board from GLYN: http://www.glyn.com/News-Events/Newsletter/Newsletter-2013/October-2013/A-quick-start-for-EVE-Requires-no-basic-knowledge-graphics-sound-and-touch-can-all-be-learned-in-minutes
The module has a 40 pin flex cable connector to connect a display out of the EDT series.
The mbed is connected via the pin header on the left. If you use this board with a EDT display you have to uncomment the #define Inv_Backlite in FT_LCD_Type.h, because the backlight dimming is inverted.
3. ConnectEVE board from MikroElektronika http://www.mikroe.com/add-on-boards/display/connecteve/#headers_10 The board has also a pin header to connect the mbed. - not tested, but it looks like the other boards.
Connection
We need 5 signals to connect to the mbed. SCK, MOSI and MISO are connected to a SPI channel. SS is the chip select signal and PD work as powerdown. The additional INT signal is not used at the moment. It is possible to generate a interrupt signal, but at the moment you have to poll the status register of the FT800 to see if a command is finished.
Software
This lib is based on the demo code from FTDI. If you want to use it, you have to read the programming manual : http://www.ftdichip.com/Support/Documents/ProgramGuides/FT800%20Programmers%20Guide.pdf
See my demo : http://mbed.org/users/dreschpe/code/FT800_touch_track/
or the demo code from FTDI : http://www.ftdichip.com/Support/SoftwareExamples/EVE/FT800_SampleApp_1.0.zip
FT_Gpu.h@2:ab74a9a05970, 2014-01-04 (annotated)
- Committer:
- dreschpe
- Date:
- Sat Jan 04 13:56:38 2014 +0000
- Revision:
- 2:ab74a9a05970
- Parent:
- 0:5e013296b353
add doku
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dreschpe | 2:ab74a9a05970 | 1 | /* mbed Library for FTDI FT800 Enbedded Video Engine "EVE" |
dreschpe | 2:ab74a9a05970 | 2 | * based on Original Code Sample from FTDI |
dreschpe | 2:ab74a9a05970 | 3 | * ported to mbed by Peter Drescher, DC2PD 2014 |
dreschpe | 2:ab74a9a05970 | 4 | * Released under the MIT License: http://mbed.org/license/mit */ |
dreschpe | 2:ab74a9a05970 | 5 | |
dreschpe | 0:5e013296b353 | 6 | #ifndef _FT_GPU_H_ |
dreschpe | 0:5e013296b353 | 7 | #define _FT_GPU_H_ |
dreschpe | 0:5e013296b353 | 8 | |
dreschpe | 0:5e013296b353 | 9 | /* Definitions used for FT800 co processor command buffer */ |
dreschpe | 0:5e013296b353 | 10 | #define FT_DL_SIZE (8*1024) //8KB Display List buffer size |
dreschpe | 0:5e013296b353 | 11 | #define FT_CMD_FIFO_SIZE (4*1024) //4KB coprocessor Fifo size |
dreschpe | 0:5e013296b353 | 12 | #define FT_CMD_SIZE (4) //4 byte per coprocessor command of EVE |
dreschpe | 0:5e013296b353 | 13 | |
dreschpe | 0:5e013296b353 | 14 | #define FT800_VERSION "1.9.0" |
dreschpe | 0:5e013296b353 | 15 | #define ADC_DIFFERENTIAL 1UL |
dreschpe | 0:5e013296b353 | 16 | #define ADC_SINGLE_ENDED 0UL |
dreschpe | 0:5e013296b353 | 17 | #define ADPCM_SAMPLES 2UL |
dreschpe | 0:5e013296b353 | 18 | #define ALWAYS 7UL |
dreschpe | 0:5e013296b353 | 19 | #define ARGB1555 0UL |
dreschpe | 0:5e013296b353 | 20 | #define ARGB2 5UL |
dreschpe | 0:5e013296b353 | 21 | #define ARGB4 6UL |
dreschpe | 0:5e013296b353 | 22 | #define BARGRAPH 11UL |
dreschpe | 0:5e013296b353 | 23 | #define BILINEAR 1UL |
dreschpe | 0:5e013296b353 | 24 | #define BITMAPS 1UL |
dreschpe | 0:5e013296b353 | 25 | #define BORDER 0UL |
dreschpe | 0:5e013296b353 | 26 | |
dreschpe | 0:5e013296b353 | 27 | #define CMDBUF_SIZE 4096UL |
dreschpe | 0:5e013296b353 | 28 | #define CMD_APPEND 4294967070UL |
dreschpe | 0:5e013296b353 | 29 | #define CMD_BGCOLOR 4294967049UL |
dreschpe | 0:5e013296b353 | 30 | #define CMD_BITMAP_TRANSFORM 4294967073UL |
dreschpe | 0:5e013296b353 | 31 | #define CMD_BUTTON 4294967053UL |
dreschpe | 0:5e013296b353 | 32 | #define CMD_CALIBRATE 4294967061UL |
dreschpe | 0:5e013296b353 | 33 | #define CMD_CLOCK 4294967060UL |
dreschpe | 0:5e013296b353 | 34 | #define CMD_COLDSTART 4294967090UL |
dreschpe | 0:5e013296b353 | 35 | #define CMD_CRC 4294967043UL |
dreschpe | 0:5e013296b353 | 36 | #define CMD_DIAL 4294967085UL |
dreschpe | 0:5e013296b353 | 37 | #define CMD_DLSTART 4294967040UL |
dreschpe | 0:5e013296b353 | 38 | #define CMD_EXECUTE 4294967047UL |
dreschpe | 0:5e013296b353 | 39 | #define CMD_FGCOLOR 4294967050UL |
dreschpe | 0:5e013296b353 | 40 | #define CMD_GAUGE 4294967059UL |
dreschpe | 0:5e013296b353 | 41 | #define CMD_GETMATRIX 4294967091UL |
dreschpe | 0:5e013296b353 | 42 | #define CMD_GETPOINT 4294967048UL |
dreschpe | 0:5e013296b353 | 43 | #define CMD_GETPROPS 4294967077UL |
dreschpe | 0:5e013296b353 | 44 | #define CMD_GETPTR 4294967075UL |
dreschpe | 0:5e013296b353 | 45 | #define CMD_GRADCOLOR 4294967092UL |
dreschpe | 0:5e013296b353 | 46 | #define CMD_GRADIENT 4294967051UL |
dreschpe | 0:5e013296b353 | 47 | #define CMD_HAMMERAUX 4294967044UL |
dreschpe | 0:5e013296b353 | 48 | #define CMD_IDCT 4294967046UL |
dreschpe | 0:5e013296b353 | 49 | #define CMD_INFLATE 4294967074UL |
dreschpe | 0:5e013296b353 | 50 | #define CMD_INTERRUPT 4294967042UL |
dreschpe | 0:5e013296b353 | 51 | #define CMD_KEYS 4294967054UL |
dreschpe | 0:5e013296b353 | 52 | #define CMD_LOADIDENTITY 4294967078UL |
dreschpe | 0:5e013296b353 | 53 | #define CMD_LOADIMAGE 4294967076UL |
dreschpe | 0:5e013296b353 | 54 | #define CMD_LOGO 4294967089UL |
dreschpe | 0:5e013296b353 | 55 | #define CMD_MARCH 4294967045UL |
dreschpe | 0:5e013296b353 | 56 | #define CMD_MEMCPY 4294967069UL |
dreschpe | 0:5e013296b353 | 57 | #define CMD_MEMCRC 4294967064UL |
dreschpe | 0:5e013296b353 | 58 | #define CMD_MEMSET 4294967067UL |
dreschpe | 0:5e013296b353 | 59 | #define CMD_MEMWRITE 4294967066UL |
dreschpe | 0:5e013296b353 | 60 | #define CMD_MEMZERO 4294967068UL |
dreschpe | 0:5e013296b353 | 61 | #define CMD_NUMBER 4294967086UL |
dreschpe | 0:5e013296b353 | 62 | #define CMD_PROGRESS 4294967055UL |
dreschpe | 0:5e013296b353 | 63 | #define CMD_REGREAD 4294967065UL |
dreschpe | 0:5e013296b353 | 64 | #define CMD_ROTATE 4294967081UL |
dreschpe | 0:5e013296b353 | 65 | #define CMD_SCALE 4294967080UL |
dreschpe | 0:5e013296b353 | 66 | #define CMD_SCREENSAVER 4294967087UL |
dreschpe | 0:5e013296b353 | 67 | #define CMD_SCROLLBAR 4294967057UL |
dreschpe | 0:5e013296b353 | 68 | #define CMD_SETFONT 4294967083UL |
dreschpe | 0:5e013296b353 | 69 | #define CMD_SETMATRIX 4294967082UL |
dreschpe | 0:5e013296b353 | 70 | #define CMD_SKETCH 4294967088UL |
dreschpe | 0:5e013296b353 | 71 | #define CMD_SLIDER 4294967056UL |
dreschpe | 0:5e013296b353 | 72 | #define CMD_SNAPSHOT 4294967071UL |
dreschpe | 0:5e013296b353 | 73 | #define CMD_SPINNER 4294967062UL |
dreschpe | 0:5e013296b353 | 74 | #define CMD_STOP 4294967063UL |
dreschpe | 0:5e013296b353 | 75 | #define CMD_SWAP 4294967041UL |
dreschpe | 0:5e013296b353 | 76 | #define CMD_TEXT 4294967052UL |
dreschpe | 0:5e013296b353 | 77 | #define CMD_TOGGLE 4294967058UL |
dreschpe | 0:5e013296b353 | 78 | #define CMD_TOUCH_TRANSFORM 4294967072UL |
dreschpe | 0:5e013296b353 | 79 | #define CMD_TRACK 4294967084UL |
dreschpe | 0:5e013296b353 | 80 | #define CMD_TRANSLATE 4294967079UL |
dreschpe | 0:5e013296b353 | 81 | |
dreschpe | 0:5e013296b353 | 82 | #define DECR 4UL |
dreschpe | 0:5e013296b353 | 83 | #define DECR_WRAP 7UL |
dreschpe | 0:5e013296b353 | 84 | #define DLSWAP_DONE 0UL |
dreschpe | 0:5e013296b353 | 85 | #define DLSWAP_FRAME 2UL |
dreschpe | 0:5e013296b353 | 86 | #define DLSWAP_LINE 1UL |
dreschpe | 0:5e013296b353 | 87 | #define DST_ALPHA 3UL |
dreschpe | 0:5e013296b353 | 88 | #define EDGE_STRIP_A 7UL |
dreschpe | 0:5e013296b353 | 89 | #define EDGE_STRIP_B 8UL |
dreschpe | 0:5e013296b353 | 90 | #define EDGE_STRIP_L 6UL |
dreschpe | 0:5e013296b353 | 91 | #define EDGE_STRIP_R 5UL |
dreschpe | 0:5e013296b353 | 92 | #define EQUAL 5UL |
dreschpe | 0:5e013296b353 | 93 | #define GEQUAL 4UL |
dreschpe | 0:5e013296b353 | 94 | #define GREATER 3UL |
dreschpe | 0:5e013296b353 | 95 | #define INCR 3UL |
dreschpe | 0:5e013296b353 | 96 | #define INCR_WRAP 6UL |
dreschpe | 0:5e013296b353 | 97 | #define INT_CMDEMPTY 32UL |
dreschpe | 0:5e013296b353 | 98 | #define INT_CMDFLAG 64UL |
dreschpe | 0:5e013296b353 | 99 | #define INT_CONVCOMPLETE 128UL |
dreschpe | 0:5e013296b353 | 100 | #define INT_PLAYBACK 16UL |
dreschpe | 0:5e013296b353 | 101 | #define INT_SOUND 8UL |
dreschpe | 0:5e013296b353 | 102 | #define INT_SWAP 1UL |
dreschpe | 0:5e013296b353 | 103 | #define INT_TAG 4UL |
dreschpe | 0:5e013296b353 | 104 | #define INT_TOUCH 2UL |
dreschpe | 0:5e013296b353 | 105 | #define INVERT 5UL |
dreschpe | 0:5e013296b353 | 106 | |
dreschpe | 0:5e013296b353 | 107 | #define KEEP 1UL |
dreschpe | 0:5e013296b353 | 108 | #define L1 1UL |
dreschpe | 0:5e013296b353 | 109 | #define L4 2UL |
dreschpe | 0:5e013296b353 | 110 | #define L8 3UL |
dreschpe | 0:5e013296b353 | 111 | #define LEQUAL 2UL |
dreschpe | 0:5e013296b353 | 112 | #define LESS 1UL |
dreschpe | 0:5e013296b353 | 113 | #define LINEAR_SAMPLES 0UL |
dreschpe | 0:5e013296b353 | 114 | #define LINES 3UL |
dreschpe | 0:5e013296b353 | 115 | #define LINE_STRIP 4UL |
dreschpe | 0:5e013296b353 | 116 | #define NEAREST 0UL |
dreschpe | 0:5e013296b353 | 117 | #define NEVER 0UL |
dreschpe | 0:5e013296b353 | 118 | #define NOTEQUAL 6UL |
dreschpe | 0:5e013296b353 | 119 | #define ONE 1UL |
dreschpe | 0:5e013296b353 | 120 | #define ONE_MINUS_DST_ALPHA 5UL |
dreschpe | 0:5e013296b353 | 121 | #define ONE_MINUS_SRC_ALPHA 4UL |
dreschpe | 0:5e013296b353 | 122 | #define OPT_CENTER 1536UL |
dreschpe | 0:5e013296b353 | 123 | #define OPT_CENTERX 512UL |
dreschpe | 0:5e013296b353 | 124 | #define OPT_CENTERY 1024UL |
dreschpe | 0:5e013296b353 | 125 | #define OPT_FLAT 256UL |
dreschpe | 0:5e013296b353 | 126 | #define OPT_MONO 1UL |
dreschpe | 0:5e013296b353 | 127 | #define OPT_NOBACK 4096UL |
dreschpe | 0:5e013296b353 | 128 | #define OPT_NODL 2UL |
dreschpe | 0:5e013296b353 | 129 | #define OPT_NOHANDS 49152UL |
dreschpe | 0:5e013296b353 | 130 | #define OPT_NOHM 16384UL |
dreschpe | 0:5e013296b353 | 131 | #define OPT_NOPOINTER 16384UL |
dreschpe | 0:5e013296b353 | 132 | #define OPT_NOSECS 32768UL |
dreschpe | 0:5e013296b353 | 133 | #define OPT_NOTICKS 8192UL |
dreschpe | 0:5e013296b353 | 134 | #define OPT_RIGHTX 2048UL |
dreschpe | 0:5e013296b353 | 135 | #define OPT_SIGNED 256UL |
dreschpe | 0:5e013296b353 | 136 | #define PALETTED 8UL |
dreschpe | 2:ab74a9a05970 | 137 | #define POINTS 2UL |
dreschpe | 0:5e013296b353 | 138 | #define FTPOINTS 2UL |
dreschpe | 0:5e013296b353 | 139 | #define RECTS 9UL |
dreschpe | 0:5e013296b353 | 140 | |
dreschpe | 0:5e013296b353 | 141 | #define RAM_CMD 1081344UL |
dreschpe | 0:5e013296b353 | 142 | #define RAM_DL 1048576UL |
dreschpe | 0:5e013296b353 | 143 | #define RAM_G 0UL |
dreschpe | 0:5e013296b353 | 144 | #define RAM_PAL 1056768UL |
dreschpe | 0:5e013296b353 | 145 | #define RAM_REG 1057792UL |
dreschpe | 0:5e013296b353 | 146 | |
dreschpe | 0:5e013296b353 | 147 | |
dreschpe | 0:5e013296b353 | 148 | |
dreschpe | 0:5e013296b353 | 149 | #define REG_ANALOG 1058104UL |
dreschpe | 0:5e013296b353 | 150 | #define REG_ANA_COMP 1058160UL |
dreschpe | 0:5e013296b353 | 151 | #define REG_CLOCK 1057800UL |
dreschpe | 0:5e013296b353 | 152 | #define REG_CMD_DL 1058028UL |
dreschpe | 0:5e013296b353 | 153 | #define REG_CMD_READ 1058020UL |
dreschpe | 0:5e013296b353 | 154 | #define REG_CMD_WRITE 1058024UL |
dreschpe | 0:5e013296b353 | 155 | #define REG_CPURESET 1057820UL |
dreschpe | 0:5e013296b353 | 156 | #define REG_CRC 1058152UL |
dreschpe | 0:5e013296b353 | 157 | #define REG_CSPREAD 1057892UL |
dreschpe | 0:5e013296b353 | 158 | #define REG_CYA0 1058000UL |
dreschpe | 0:5e013296b353 | 159 | #define REG_CYA1 1058004UL |
dreschpe | 0:5e013296b353 | 160 | #define REG_CYA_TOUCH 1058100UL |
dreschpe | 0:5e013296b353 | 161 | #define REG_DATESTAMP 1058108UL |
dreschpe | 0:5e013296b353 | 162 | #define REG_DITHER 1057884UL |
dreschpe | 0:5e013296b353 | 163 | #define REG_DLSWAP 1057872UL |
dreschpe | 0:5e013296b353 | 164 | #define REG_FRAMES 1057796UL |
dreschpe | 0:5e013296b353 | 165 | #define REG_FREQUENCY 1057804UL |
dreschpe | 0:5e013296b353 | 166 | #define REG_GPIO 1057936UL |
dreschpe | 0:5e013296b353 | 167 | #define REG_GPIO_DIR 1057932UL |
dreschpe | 0:5e013296b353 | 168 | #define REG_HCYCLE 1057832UL |
dreschpe | 0:5e013296b353 | 169 | #define REG_HOFFSET 1057836UL |
dreschpe | 0:5e013296b353 | 170 | #define REG_HSIZE 1057840UL |
dreschpe | 0:5e013296b353 | 171 | #define REG_HSYNC0 1057844UL |
dreschpe | 0:5e013296b353 | 172 | #define REG_HSYNC1 1057848UL |
dreschpe | 0:5e013296b353 | 173 | #define REG_ID 1057792UL |
dreschpe | 0:5e013296b353 | 174 | #define REG_INT_EN 1057948UL |
dreschpe | 0:5e013296b353 | 175 | #define REG_INT_FLAGS 1057944UL |
dreschpe | 0:5e013296b353 | 176 | #define REG_INT_MASK 1057952UL |
dreschpe | 0:5e013296b353 | 177 | #define REG_MACRO_0 1057992UL |
dreschpe | 0:5e013296b353 | 178 | #define REG_MACRO_1 1057996UL |
dreschpe | 0:5e013296b353 | 179 | #define REG_OUTBITS 1057880UL |
dreschpe | 0:5e013296b353 | 180 | #define REG_PCLK 1057900UL |
dreschpe | 0:5e013296b353 | 181 | #define REG_PCLK_POL 1057896UL |
dreschpe | 0:5e013296b353 | 182 | #define REG_PLAY 1057928UL |
dreschpe | 0:5e013296b353 | 183 | #define REG_PLAYBACK_FORMAT 1057972UL |
dreschpe | 0:5e013296b353 | 184 | #define REG_PLAYBACK_FREQ 1057968UL |
dreschpe | 0:5e013296b353 | 185 | #define REG_PLAYBACK_LENGTH 1057960UL |
dreschpe | 0:5e013296b353 | 186 | #define REG_PLAYBACK_LOOP 1057976UL |
dreschpe | 0:5e013296b353 | 187 | #define REG_PLAYBACK_PLAY 1057980UL |
dreschpe | 0:5e013296b353 | 188 | #define REG_PLAYBACK_READPTR 1057964UL |
dreschpe | 0:5e013296b353 | 189 | #define REG_PLAYBACK_START 1057956UL |
dreschpe | 0:5e013296b353 | 190 | #define REG_PWM_DUTY 1057988UL |
dreschpe | 0:5e013296b353 | 191 | #define REG_PWM_HZ 1057984UL |
dreschpe | 0:5e013296b353 | 192 | #define REG_RENDERMODE 1057808UL |
dreschpe | 0:5e013296b353 | 193 | #define REG_ROMSUB_SEL 1058016UL |
dreschpe | 0:5e013296b353 | 194 | #define REG_ROTATE 1057876UL |
dreschpe | 0:5e013296b353 | 195 | #define REG_SNAPSHOT 1057816UL |
dreschpe | 0:5e013296b353 | 196 | #define REG_SNAPY 1057812UL |
dreschpe | 0:5e013296b353 | 197 | #define REG_SOUND 1057924UL |
dreschpe | 0:5e013296b353 | 198 | #define REG_SWIZZLE 1057888UL |
dreschpe | 0:5e013296b353 | 199 | #define REG_TAG 1057912UL |
dreschpe | 0:5e013296b353 | 200 | #define REG_TAG_X 1057904UL |
dreschpe | 0:5e013296b353 | 201 | #define REG_TAG_Y 1057908UL |
dreschpe | 0:5e013296b353 | 202 | #define REG_TAP_CRC 1057824UL |
dreschpe | 0:5e013296b353 | 203 | #define REG_TAP_MASK 1057828UL |
dreschpe | 0:5e013296b353 | 204 | #define REG_TOUCH_ADC_MODE 1058036UL |
dreschpe | 0:5e013296b353 | 205 | #define REG_TOUCH_CHARGE 1058040UL |
dreschpe | 0:5e013296b353 | 206 | #define REG_TOUCH_DIRECT_XY 1058164UL |
dreschpe | 0:5e013296b353 | 207 | #define REG_TOUCH_DIRECT_Z1Z2 1058168UL |
dreschpe | 0:5e013296b353 | 208 | #define REG_TOUCH_MODE 1058032UL |
dreschpe | 0:5e013296b353 | 209 | #define REG_TOUCH_OVERSAMPLE 1058048UL |
dreschpe | 0:5e013296b353 | 210 | #define REG_TOUCH_RAW_XY 1058056UL |
dreschpe | 0:5e013296b353 | 211 | #define REG_TOUCH_RZ 1058060UL |
dreschpe | 0:5e013296b353 | 212 | #define REG_TOUCH_RZTHRESH 1058052UL |
dreschpe | 0:5e013296b353 | 213 | #define REG_TOUCH_SCREEN_XY 1058064UL |
dreschpe | 0:5e013296b353 | 214 | #define REG_TOUCH_SETTLE 1058044UL |
dreschpe | 0:5e013296b353 | 215 | #define REG_TOUCH_TAG 1058072UL |
dreschpe | 0:5e013296b353 | 216 | #define REG_TOUCH_TAG_XY 1058068UL |
dreschpe | 0:5e013296b353 | 217 | #define REG_TOUCH_TRANSFORM_A 1058076UL |
dreschpe | 0:5e013296b353 | 218 | #define REG_TOUCH_TRANSFORM_B 1058080UL |
dreschpe | 0:5e013296b353 | 219 | #define REG_TOUCH_TRANSFORM_C 1058084UL |
dreschpe | 0:5e013296b353 | 220 | #define REG_TOUCH_TRANSFORM_D 1058088UL |
dreschpe | 0:5e013296b353 | 221 | #define REG_TOUCH_TRANSFORM_E 1058092UL |
dreschpe | 0:5e013296b353 | 222 | #define REG_TOUCH_TRANSFORM_F 1058096UL |
dreschpe | 0:5e013296b353 | 223 | #define REG_TRACKER 1085440UL |
dreschpe | 0:5e013296b353 | 224 | #define REG_TRIM 1058156UL |
dreschpe | 0:5e013296b353 | 225 | #define REG_VCYCLE 1057852UL |
dreschpe | 0:5e013296b353 | 226 | #define REG_VOFFSET 1057856UL |
dreschpe | 0:5e013296b353 | 227 | #define REG_VOL_PB 1057916UL |
dreschpe | 0:5e013296b353 | 228 | #define REG_VOL_SOUND 1057920UL |
dreschpe | 0:5e013296b353 | 229 | #define REG_VSIZE 1057860UL |
dreschpe | 0:5e013296b353 | 230 | #define REG_VSYNC0 1057864UL |
dreschpe | 0:5e013296b353 | 231 | #define REG_VSYNC1 1057868UL |
dreschpe | 0:5e013296b353 | 232 | |
dreschpe | 0:5e013296b353 | 233 | |
dreschpe | 0:5e013296b353 | 234 | #define REPEAT 1UL |
dreschpe | 0:5e013296b353 | 235 | #define REPLACE 2UL |
dreschpe | 0:5e013296b353 | 236 | #define RGB332 4UL |
dreschpe | 0:5e013296b353 | 237 | #define RGB565 7UL |
dreschpe | 0:5e013296b353 | 238 | #define SRC_ALPHA 2UL |
dreschpe | 0:5e013296b353 | 239 | #define TEXT8X8 9UL |
dreschpe | 0:5e013296b353 | 240 | #define TEXTVGA 10UL |
dreschpe | 0:5e013296b353 | 241 | #define TOUCHMODE_CONTINUOUS 3UL |
dreschpe | 0:5e013296b353 | 242 | #define TOUCHMODE_FRAME 2UL |
dreschpe | 0:5e013296b353 | 243 | #define TOUCHMODE_OFF 0UL |
dreschpe | 0:5e013296b353 | 244 | #define TOUCHMODE_ONESHOT 1UL |
dreschpe | 0:5e013296b353 | 245 | #define ULAW_SAMPLES 1UL |
dreschpe | 0:5e013296b353 | 246 | #define ZERO 0UL |
dreschpe | 0:5e013296b353 | 247 | |
dreschpe | 0:5e013296b353 | 248 | |
dreschpe | 0:5e013296b353 | 249 | #define VERTEX2F(x,y) ((1UL<<30)|(((x)&32767UL)<<15)|(((y)&32767UL)<<0)) |
dreschpe | 0:5e013296b353 | 250 | #define VERTEX2II(x,y,handle,cell) ((2UL<<30)|(((x)&511UL)<<21)|(((y)&511UL)<<12)|(((handle)&31UL)<<7)|(((cell)&127UL)<<0)) |
dreschpe | 0:5e013296b353 | 251 | #define BITMAP_SOURCE(addr) ((1UL<<24)|(((addr)&1048575UL)<<0)) |
dreschpe | 0:5e013296b353 | 252 | #define CLEAR_COLOR_RGB(red,green,blue) ((2UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 253 | #define TAG(s) ((3UL<<24)|(((s)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 254 | #define COLOR_RGB(red,green,blue) ((4UL<<24)|(((red)&255UL)<<16)|(((green)&255UL)<<8)|(((blue)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 255 | #define BITMAP_HANDLE(handle) ((5UL<<24)|(((handle)&31UL)<<0)) |
dreschpe | 0:5e013296b353 | 256 | #define CELL(cell) ((6UL<<24)|(((cell)&127UL)<<0)) |
dreschpe | 0:5e013296b353 | 257 | #define BITMAP_LAYOUT(format,linestride,height) ((7UL<<24)|(((format)&31UL)<<19)|(((linestride)&1023UL)<<9)|(((height)&511UL)<<0)) |
dreschpe | 0:5e013296b353 | 258 | #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 | 259 | #define ALPHA_FUNC(func,ref) ((9UL<<24)|(((func)&7UL)<<8)|(((ref)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 260 | #define STENCIL_FUNC(func,ref,mask) ((10UL<<24)|(((func)&7UL)<<16)|(((ref)&255UL)<<8)|(((mask)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 261 | #define BLEND_FUNC(src,dst) ((11UL<<24)|(((src)&7UL)<<3)|(((dst)&7UL)<<0)) |
dreschpe | 0:5e013296b353 | 262 | #define STENCIL_OP(sfail,spass) ((12UL<<24)|(((sfail)&7UL)<<3)|(((spass)&7UL)<<0)) |
dreschpe | 0:5e013296b353 | 263 | #define POINT_SIZE(size) ((13UL<<24)|(((size)&8191UL)<<0)) |
dreschpe | 0:5e013296b353 | 264 | #define LINE_WIDTH(width) ((14UL<<24)|(((width)&4095UL)<<0)) |
dreschpe | 0:5e013296b353 | 265 | #define CLEAR_COLOR_A(alpha) ((15UL<<24)|(((alpha)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 266 | #define COLOR_A(alpha) ((16UL<<24)|(((alpha)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 267 | #define CLEAR_STENCIL(s) ((17UL<<24)|(((s)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 268 | #define CLEAR_TAG(s) ((18UL<<24)|(((s)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 269 | #define STENCIL_MASK(mask) ((19UL<<24)|(((mask)&255UL)<<0)) |
dreschpe | 0:5e013296b353 | 270 | #define TAG_MASK(mask) ((20UL<<24)|(((mask)&1UL)<<0)) |
dreschpe | 0:5e013296b353 | 271 | #define BITMAP_TRANSFORM_A(a) ((21UL<<24)|(((a)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 272 | #define BITMAP_TRANSFORM_B(b) ((22UL<<24)|(((b)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 273 | #define BITMAP_TRANSFORM_C(c) ((23UL<<24)|(((c)&16777215UL)<<0)) |
dreschpe | 0:5e013296b353 | 274 | #define BITMAP_TRANSFORM_D(d) ((24UL<<24)|(((d)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 275 | #define BITMAP_TRANSFORM_E(e) ((25UL<<24)|(((e)&131071UL)<<0)) |
dreschpe | 0:5e013296b353 | 276 | #define BITMAP_TRANSFORM_F(f) ((26UL<<24)|(((f)&16777215UL)<<0)) |
dreschpe | 0:5e013296b353 | 277 | #define SCISSOR_XY(x,y) ((27UL<<24)|(((x)&511UL)<<9)|(((y)&511UL)<<0)) |
dreschpe | 0:5e013296b353 | 278 | #define SCISSOR_SIZE(width,height) ((28UL<<24)|(((width)&1023UL)<<10)|(((height)&1023UL)<<0)) |
dreschpe | 0:5e013296b353 | 279 | #define CALL(dest) ((29UL<<24)|(((dest)&65535UL)<<0)) |
dreschpe | 0:5e013296b353 | 280 | #define JUMP(dest) ((30UL<<24)|(((dest)&65535UL)<<0)) |
dreschpe | 0:5e013296b353 | 281 | #define BEGIN(prim) ((31UL<<24)|(((prim)&15UL)<<0)) |
dreschpe | 0:5e013296b353 | 282 | #define COLOR_MASK(r,g,b,a) ((32UL<<24)|(((r)&1UL)<<3)|(((g)&1UL)<<2)|(((b)&1UL)<<1)|(((a)&1UL)<<0)) |
dreschpe | 0:5e013296b353 | 283 | #define CLEAR(c,s,t) ((38UL<<24)|(((c)&1UL)<<2)|(((s)&1UL)<<1)|(((t)&1UL)<<0)) |
dreschpe | 0:5e013296b353 | 284 | #define END() ((33UL<<24)) |
dreschpe | 0:5e013296b353 | 285 | #define SAVE_CONTEXT() ((34UL<<24)) |
dreschpe | 0:5e013296b353 | 286 | #define RESTORE_CONTEXT() ((35UL<<24)) |
dreschpe | 0:5e013296b353 | 287 | #define RETURN() ((36UL<<24)) |
dreschpe | 0:5e013296b353 | 288 | #define MACRO(m) ((37UL<<24)|(((m)&1UL)<<0)) |
dreschpe | 0:5e013296b353 | 289 | #define DISPLAY() ((0UL<<24)) |
dreschpe | 0:5e013296b353 | 290 | |
dreschpe | 0:5e013296b353 | 291 | #define FT_GPU_NUMCHAR_PERFONT (128) |
dreschpe | 0:5e013296b353 | 292 | #define FT_GPU_FONT_TABLE_SIZE (148) |
dreschpe | 0:5e013296b353 | 293 | |
dreschpe | 0:5e013296b353 | 294 | |
dreschpe | 0:5e013296b353 | 295 | |
dreschpe | 0:5e013296b353 | 296 | /* FT800 font table structure */ |
dreschpe | 0:5e013296b353 | 297 | /* Font table address in ROM can be found by reading the address from 0xFFFFC location. */ |
dreschpe | 0:5e013296b353 | 298 | /* 16 font tables are present at the address read from location 0xFFFFC */ |
dreschpe | 0:5e013296b353 | 299 | typedef struct FT_Gpu_Fonts |
dreschpe | 0:5e013296b353 | 300 | { |
dreschpe | 0:5e013296b353 | 301 | /* All the values are in bytes */ |
dreschpe | 0:5e013296b353 | 302 | /* Width of each character font from 0 to 127 */ |
dreschpe | 0:5e013296b353 | 303 | ft_uint8_t FontWidth[FT_GPU_NUMCHAR_PERFONT]; |
dreschpe | 0:5e013296b353 | 304 | /* Bitmap format of font wrt bitmap formats supported by FT800 - L1, L4, L8 */ |
dreschpe | 0:5e013296b353 | 305 | ft_uint32_t FontBitmapFormat; |
dreschpe | 0:5e013296b353 | 306 | /* Font line stride in FT800 ROM */ |
dreschpe | 0:5e013296b353 | 307 | ft_uint32_t FontLineStride; |
dreschpe | 0:5e013296b353 | 308 | /* Font width in pixels */ |
dreschpe | 0:5e013296b353 | 309 | ft_uint32_t FontWidthInPixels; |
dreschpe | 0:5e013296b353 | 310 | /* Font height in pixels */ |
dreschpe | 0:5e013296b353 | 311 | ft_uint32_t FontHeightInPixels; |
dreschpe | 0:5e013296b353 | 312 | /* Pointer to font graphics raw data */ |
dreschpe | 0:5e013296b353 | 313 | ft_uint32_t PointerToFontGraphicsData; |
dreschpe | 0:5e013296b353 | 314 | }FT_Gpu_Fonts_t; |
dreschpe | 0:5e013296b353 | 315 | |
dreschpe | 0:5e013296b353 | 316 | #endif /* #ifndef _FT_GPU_H_ */ |
dreschpe | 0:5e013296b353 | 317 | |
dreschpe | 0:5e013296b353 | 318 | |
dreschpe | 0:5e013296b353 | 319 | /* Nothing beyond this */ |
dreschpe | 0:5e013296b353 | 320 | |
dreschpe | 0:5e013296b353 | 321 | |
dreschpe | 0:5e013296b353 | 322 | |
dreschpe | 0:5e013296b353 | 323 | |
dreschpe | 0:5e013296b353 | 324 |