Id-dar > Aħbarijiet > Il-kontenut

FT_Gpu.h

May 06, 2019


#ifndef _FT_GPU_H_

#define _FT_GPU_H_


/ * Definizzjonijiet użati għal FT800 ko-proċessur ta 'kmand buffer * /

#define FT_DL_SIZE (8 * 1024) // Daqs tal-bafer tal-Lista tal-Wiri 8KB

#define FT_CMD_FIFO_SIZE (4 * 1024) // 4KB koproċessur Daqs Fifo

#define FT_CMD_SIZE (4) // 4 byte għal kull kmand ta 'koproċessur ta' EVE


/ * Għal FT801 * /

#definita CTOUCH_MODE_COMPATABILITY 1

#defini CTOUCH_MODE_EXTENDED 0



#define FT800_VERSION "1.9.0"

#definita ADC_DIFFERENTIAL 1UL

# tiddefinixxi ADC_SINGLE_ENDED 0UL

# jiddefinixxi ADPCM_SAMPLES 2UL

# jiddefinixxi DEJJEM 7UL

# jiddefinixxi ARGB1555 0UL

# jiddefinixxi ARGB2 5UL

# jiddefinixxi ARGB4 6UL

# tiddefinixxi l-grafika 11UL

# jiddefinixxi BILINEAR 1UL

# tiddefinixxi BITMAPS 1UL

# jiddefinixxi fruntiera 0ul


# tiddefinixxi CMDBUF_SIZE 4096UL

#definixxi CMD_APPEND 4294967070UL

#definixxi CMD_BGCOLOR 4294967049UL

#definixxi CMD_BITMAP_TRANSFORM 4294967073UL

# tiddefinixxi CMD_BUTTON 4294967053UL

#definixxi CMD_CALIBRATE 4294967061UL

# tiddefinixxi CMD_CSKETCH 4294967093UL

#definixxi CMD_CLOCK 4294967060UL

#definixxi CMD_COLDSTART 4294967090UL

#definixxi CMD_CRC 4294967043UL

# tiddefinixxi CMD_DIAL 4294967085UL

#definixxi CMD_DLSTART 4294967040UL

#definixxi CMD_EXECUTE 4294967047UL

#definixxi CMD_FGCOLOR 4294967050UL

#definixxi CMD_GAUGE 4294967059UL

#definixxi CMD_GETMATRIX 4294967091UL

#definixxi CMD_GETPOINT 4294967048UL

#definixxi CMD_GETPROPS 4294967077UL

#definixxi CMD_GETPTR 4294967075UL

#definixxi CMD_GRADCOLOR 4294967092UL

#definixxi CMD_GRADIENT 4294967051UL

#definixxi CMD_HAMMERAUX 4294967044UL

# tiddefinixxi CMD_IDCT 4294967046UL

# tiddefinixxi CMD_INFLATE 4294967074UL

#definixxi CMD_INTERRUPT 4294967042UL

# tiddefinixxi CMD_KEYS 4294967054UL

#definixxi CMD_LOADIDENTITY 4294967078UL

#definixxi CMD_LOADIMAGE 4294967076UL

#definixxi CMD_LOGO 4294967089UL

#definixxi CMD_MARCH 4294967045UL

# tiddefinixxi CMD_MEMCPY 4294967069UL

#definixxi CMD_MEMCRC 4294967064UL

#definixxi CMD_MEMSET 4294967067UL

#definixxi CMD_MEMWRITE 4294967066UL

#definixxi CMD_MEMZERO 4294967068UL

#definixxi CMD_NUMBER 4294967086UL

#definixxi CMD_PROGRESS 4294967055UL

#definixxi CMD_REGREAD 4294967065UL

#definixxi CMD_ROTATE 4294967081UL

# jiddefinixxi CMD_SCALE 4294967080UL

#definixxi CMD_SCREENSAVER 4294967087UL

#definixxi CMD_SCROLLBAR 4294967057UL

#definixxi CMD_SETFONT 4294967083UL

#definixxi CMD_SETMATRIX 4294967082UL

#definixxi CMD_SKETCH 4294967088UL

#definixxi CMD_SLIDER 4294967056UL

#definixxi CMD_SNAPSHOT 4294967071UL

#definixxi CMD_SPINNER 4294967062UL

#definixxi CMD_STOP 4294967063UL

#definixxi CMD_SWAP 4294967041UL

# tiddefinixxi CMD_TEXT 4294967052UL

#definixxi CMD_TOGGLE 4294967058UL

#definixxi CMD_TOUCH_TRANSFORM 4294967072UL

#definixxi CMD_TRACK 4294967084UL

#definixxi CMD_TRANSLATE 4294967079UL


# jiddefinixxi Diċembru 4UL

# tiddefinixxi DECR_WRAP 7UL

# tiddefinixxi DLSWAP_DONE 0UL

# tiddefinixxi DLSWAP_FRAME 2UL

# tiddefinixxi DLSWAP_LINE 1UL

#definixxi DST_ALPHA 3UL

# tiddefinixxi EDGE_STRIP_A 7UL

# tiddefinixxi EDGE_STRIP_B 8UL

# tiddefinixxi EDGE_STRIP_L 6UL

# tiddefinixxi EDGE_STRIP_R 5UL

# jiddefinixxi ugwali 5UL

#definita ĠEWALI 4UL

# jiddefinixxi IKTAR 3UL

# jiddefinixxi INCR 3UL

# tiddefinixxi INCR_WRAP 6UL

#defin INT_CMDEMPTY 32UL

#defini INT_CMDFLAG 64UL

#defini INT_CONVCOMPLETE 128UL

#defin INT_PLAYBACK 16UL

# jiddefinixxi INT_SOUND 8UL

# tiddefinixxi INT_SWAP 1UL

# tiddefinixxi INT_TAG 4UL

# iddefinixxi INT_TOUCH 2UL

# jiddefinixxi INVERT 5UL


# tiddefinixxi ŻOMM 1UL

# jiddefinixxi L1 1UL

# jiddefinixxi L4 2UL

# jiddefinixxi L8 3UL

# jiddefinixxi L-LUKU 2UL

# jiddefinixxi INQAS 1UL

#definixxi LINEAR_SAMPLES 0UL

# jiddefinixxu LINJI 3UL

# tiddefinixxi LINE_STRIP 4UL

# jiddefinixxi l-eqreb 0UL

# jiddefinixxi QATT 0UL

# jiddefinixxi NOTEQUAL 6UL

# tiddefinixxi WAĦDA 1UL

#definixxi ONE_MINUS_DST_ALPHA 5UL

#definixxi ONE_MINUS_SRC_ALPHA 4UL

# jiddefinixxi OPT_CENTER 1536UL

# jiddefinixxi OPT_CENTERX 512UL

#definixxi OPT_CENTERY 1024UL

# jiddefinixxi OPT_FLAT 256UL

# tiddefinixxi OPT_MONO 1UL

# jiddefinixxi OPT_NOBACK 4096UL

# tiddefinixxi OPT_NODL 2UL

# tiddefinixxi OPT_NOHANDS 49152UL

# jiddefinixxi OPT_NOHM 16384UL

# jiddefinixxi OPT_NOPOINTER 16384UL

#definixxi OPT_NOSECS 32768UL

#definixxi OPT_NOTICKS 8192UL

# tiddefinixxi OPT_RIGHTX 2048UL

# tiddefinixxi OPT_SIGNED 256UL

#definita paletta 8UL

# jiddefinixxi FTPOINTS 2UL

# tiddefinixxi l-irċevuti 9UL


# jiddefinixxi RAM_CMD 1081344UL

# jiddefinixxi RAM_DL 1048576UL

# jiddefinixxi RAM_G 0UL

# jiddefinixxi RAM_PAL 1056768UL

#defini RAM_REG 1057792UL


#define REG_ANALOG 1058104UL

#defini REG_ANA_COMP 1058160UL

# jiddefinixxi REG_CLOCK 1057800UL

#defini REG_CMD_DL 1058028UL

#defina REG_CMD_READ 1058020UL

#defini REG_CMD_WRITE 1058024UL

#defini REG_CPURESET 1057820UL

# jiddefinixxi REG_CRC 1058152UL

#defini REG_CSPREAD 1057892UL

# jiddefinixxi REG_CYA0 1058000UL

#defini REG_CYA1 1058004UL

#defini REG_CYA_TOUCH 1058100UL

#defina REG_DATESTAMP 1058108UL

#defini REG_DITHER 1057884UL

#defini REG_DLSWAP 1057872UL

#define REG_FRAMES 1057796UL

#defini REG_FREQUENCY 1057804UL

#defini REG_GPIO 1057936UL

#defini REG_GPIO_DIR 1057932UL

#defini REG_HCYCLE 1057832UL

#defini REG_HOFFSET 1057836UL

# jiddefinixxi REG_HSIZE 1057840UL

# jiddefinixxi REG_HSYNC0 1057844UL

#defini REG_HSYNC1 1057848UL

# jiddefinixxi REG_ID 1057792UL

#defini REG_INT_EN 1057948UL

#defini REG_INT_FLAGS 1057944UL

#defini REG_INT_MASK 1057952UL

#defini REG_MACRO_0 1057992UL

#defini REG_MACRO_1 1057996UL

# jiddefinixxi REG_OUTBITS 1057880UL

# tiddefinixxi REG_PCLK 1057900UL

#defini REG_PCLK_POL 1057896UL

#defini REG_PLAY 1057928UL

#define REG_PLAYBACK_FORMAT 1057972UL

#defini REG_PLAYBACK_FREQ 1057968UL

#defini REG_PLAYBACK_LENGTH 1057960UL

#defini REG_PLAYBACK_LOOP 1057976UL

#defini REG_PLAYBACK_PLAY 1057980UL

#defini REG_PLAYBACK_READPTR 1057964UL

#defini REG_PLAYBACK_START 1057956UL

#defini REG_PWM_DUTY 1057988UL

#defini REG_PWM_HZ 1057984UL

#defini REG_RENDERMODE 1057808UL

#defini REG_ROMSUB_SEL 1058016UL

#defini REG_ROTATE 1057876UL

#defini REG_SNAPSHOT 1057816UL

#defina REG_SNAPY 1057812UL

#defini REG_SOUND 1057924UL

#defini REG_SWIZZLE 1057888UL

#defini REG_TAG 1057912UL

#defini REG_TAG_X 1057904UL

#defini REG_TAG_Y 1057908UL

#defini REG_TAP_CRC 1057824UL

#defini REG_TAP_MASK 1057828UL

#defini REG_TOUCH_ADC_MODE 1058036UL

#defini REG_TOUCH_CHARGE 1058040UL

#defini REG_TOUCH_DIRECT_XY 1058164UL

#define REG_TOUCH_DIRECT_Z1Z2 1058168UL

#defini REG_TOUCH_MODE 1058032UL

#defini REG_TOUCH_OVERSAMPLE 1058048UL

#defini REG_TOUCH_RAW_XY 1058056UL

#defini REG_TOUCH_RZ 1058060UL

#defini REG_TOUCH_RZTHRESH 1058052UL

#defini REG_TOUCH_SCREEN_XY 1058064UL

#defini REG_TOUCH_SETTLE 1058044UL

#defini REG_TOUCH_TAG 1058072UL

#defini REG_TOUCH_TAG_XY 1058068UL

#defini REG_TOUCH_TRANSFORM_A 1058076UL

#defini REG_TOUCH_TRANSFORM_B 1058080UL

#defini REG_TOUCH_TRANSFORM_C 1058084UL

#defini REG_TOUCH_TRANSFORM_D 1058088UL

#defini REG_TOUCH_TRANSFORM_E 1058092UL

#defini REG_TOUCH_TRANSFORM_F 1058096UL

#defina REG_TRACKER 1085440UL

#define REG_TRIM 1058156UL

#defini REG_VCYCLE 1057852UL

#defini REG_VOFFSET 1057856UL

#defini REG_VOL_PB 1057916UL

#defini REG_VOL_SOUND 1057920UL

#define REG_VSIZE 1057860UL

#defini REG_VSYNC0 1057864UL

#defini REG_VSYNC1 1057868UL

/ * FT801 * /

#defini REG_CTOUCH_EXTENDED 1058036UL

#defini REG_CTOUCH_GESTURE 1058104UL

#defini REG_CTOUCH_IDS 1058060UL

#defini REG_CTOUCH_TOUCH0_XY 1058064UL

#defini REG_CTOUCH_TOUCH1_XY 1058056UL

#defini REG_CTOUCH_TOUCH2_XY 1058164UL

#defini REG_CTOUCH_TOUCH3_XY 1058168UL

#defini REG_CTOUCH_TOUCH4_X 1058104UL

#defini REG_CTOUCH_TOUCH4_Y 1058060UL


# jiddefinixxi Irrepeti 1UL

# jiddefinixxi BIDU 2UL

# jiddefinixxi RGB332 4UL

# jiddefinixxi RGB565 7UL

# tiddefinixxi SRC_ALPHA 2UL

# jiddefinixxi TEXT8X8 9UL

# jiddefinixxi TEXTVGA 10UL

#definixxi TOUCHMODE_CONTINUOUS 3UL

#definita TOUCHMODE_FRAME 2UL

# jiddefinixxi TOUCHMODE_OFF 0UL

# tiddefinixxi TOUCHMODE_ONESHOT 1UL

#definixxi ULAW_SAMPLES 1UL

# jiddefinixxi żero 0UL


#defini VERTEX2F (x, y) ((1UL < 30)="" |="" (((x)="" &="" 32767ul)="">< 15)="" |="" (((y)="" &="" 32767ul)=""><>

#defini VERTEX2II (x, y, manku, ċellula) ((2UL < 30)="" |="" (((x)="" &="" 511ul)="">< 21)="" |="" (((y)="" &="" 511ul)="">< 12)="" |="" (((handle)="" &="" 31ul="" )="">< 7)="" |="" (((ċellula)="" &="" 127ul)=""><>

#definixxi BITMAP_SOURCE (addr) ((1UL < 24)="" |="" (((addr)="" &="" 1048575ul)=""><>

#define CLEAR_COLOR_RGB (aħmar, aħdar, blu) ((2UL < 24)="" |="" (((aħmar)="" &="" 255ul)="">< 16)="" |="" (((aħdar)="" &="" 255ul)="">< 8)="" |="" (((blu)="" &="" 255ul)=""><><>

#definita TAG (s) ((3UL < 24)="" |="" ((s)="" &="" 255ul)=""><>

#defini COLOR_RGB (aħmar, aħdar, blu) ((4UL < 24)="" |="" (((aħmar)="" &="" 255ul)="">< 16)="" |="" (((aħdar)="" &="" 255ul)="">< 8)="" |="" (((blu)="" &="" 255ul)=""><><>

#definixxi BITMAP_HANDLE (manku) ((5UL < 24)="" |="" (((manku)="" &="" 31ul)=""><>

#definixxi ĊELLOLA (ċellula) ((6UL < 24)="" |="" (((ċellula)="" &="" 127ul)=""><>

#defin BITMAP_LAYOUT (format, linja tal-linja, għoli) ((7UL < 24)="" |="" (((format)="" &="" 31ul)="">< 19)="" |="" (((linestride)="" &="" 1023ul)="">< 9)="" |="" (((għoli)="" &="" 511ul)=""><><>

#definita BITMAP_SIZE (filtru, wrapx, tgeżwir, wisa ', għoli) ((8UL < 24)="" |="" (((filter)="" &="" 1ul)="">< 20)="" |="" (((wrapx)="" &="" 1ul)="">< 19)="" |="" (((wrapy)="" )="" &="" 1ul)="">< 18)="" |="" (((wisa="" ')="" &="" 511ul)="">< 9)="" |="" (((għoli)="" &="" 511ul)=""><>

#defini ALPHA_FUNC (func, ref) ((9UL < 24)="" |="" (((func)="" &="" 7ul)="">< 8)="" |="" (((ref)="" &="" 255ul)=""><>

#defina STENCIL_FUNC (fun, ref, maskra) ((10UL < 24)="" |="" (((func)="" &="" 7ul)="">< 16)="" |="" (((ref)="" &="" 255ul)="">< 8)="" |="" (((mask)="" &="" 255ul)=""><><>

#definixxi BLEND_FUNC (src, dst) ((11UL < 24)="" |="" (((src)="" &="" 7ul)="">< 3)="" |="" (((dst)="" &="" 7ul)=""><>

#defini STENCIL_OP (sfail, spass) ((12UL < 24)="" |="" (((sfail)="" &="" 7ul)="">< 3)="" |="" (((spass)="" &="" 7ul)=""><>

#definita POINT_SIZE (daqs) ((13UL < 24)="" |="" (((daqs)="" &="" 8191ul)=""><>

#definixxi LINE_WIDTH (wisa ') ((14UL < 24)="" |="" (((wisa')="" &="" 4095ul)=""><>

#definixxi CLEAR_COLOR_A (alfa) ((15UL < 24)="" |="" (((alpha)="" &="" 255ul)=""><>

#defini COLOR_A (alfa) ((16UL < 24)="" |="" (((alpha)="" &="" 255ul)=""><>

#definita CLEAR_STENCIL (s) ((17UL < 24)="" |="" ((s)="" &="" 255ul)=""><>

#definixxi CLEAR_TAG (s) ((18UL < 24)="" |="" (((s)="" &="" 255ul)=""><>

#definixxi STENCIL_MASK (maskra) ((19UL < 24)="" |="" (((maskra)="" &="" 255ul)=""><>

#defin TAG_MASK (maskra) ((20UL < 24)="" |="" (((mask)="" &="" 1ul)=""><>

#definixxi BITMAP_TRANSFORM_A (a) ((21UL < 24)="" |="" (((a)="" &="" 131071ul)=""><>

#definixxi BITMAP_TRANSFORM_B (b) ((22UL < 24)="" |="" (((b)="" &="" 131071ul)=""><>

#definixxi BITMAP_TRANSFORM_C (c) ((23UL < 24)="" |="" (((c)="" &="" 16777215ul)=""><>

#definixxi BITMAP_TRANSFORM_D (d) ((24UL < 24)="" |="" (((d)="" &="" 131071ul)=""><>

#definixxi BITMAP_TRANSFORM_E (e) ((25UL < 24)="" |="" (((e)="" &="" 131071ul)=""><>

#definixxi BITMAP_TRANSFORM_F (f) ((26UL < 24)="" |="" (((f)="" &="" 16777215ul)=""><>

#definita SCISSOR_XY (x, y) ((27UL < 24)="" |="" (((x)="" &="" 511ul)="">< 9)="" |="" (((y)="" &="" 511ul)=""><>

#definita SCISSOR_SIZE (wisa ', għoli) ((28UL < 24)="" |="" (((wisa')="" &="" 1023ul)="">< 10)="" |="" (((għoli)="" &="" 1023ul)=""><>

#definixxi SEJĦA (dest) ((29UL < 24)="" |="" (((dest)="" &="" 65535ul)=""><>

#defin JUMP (dest) ((30UL < 24)="" |="" (((dest)="" &="" 65535ul)=""><>

#defin BIDU (prim) ((31UL < 24)="" |="" (((prim)="" &="" 15ul)=""><>

#defini COLOR_MASK (r, g, b, a) ((32UL < 24)="" |="" (((r)="" &="" 1ul)="">< 3)="" |="" (((g)="" &="" 1ul)="">< 2)="" |="" (((b)="" &="" 1ul)="" )="">< 1)="" |="" (((a)="" &="" 1ul)=""><>

#definita ĊARA (c, s, t) ((38UL < 24)="" |="" (((c)="" &="" 1ul)="">< 2)="" |="" (((s)="" &="" 1ul)="">< 1)="" |="" (((t)="" &="" 1ul)=""><><>

#defin END () ((33UL <>

#defin SAVE_CONTEXT () ((34UL <>

#defini RESTORE_CONTEXT () ((35UL <>

#define RITURN () ((36UL <>

#defini MACRO (m) ((37UL < 24)="" |="" (((m)="" &="" 1ul)=""><>

# tiddefinixxi DISPLAY () ((0UL <>


#defin FT_GPU_NUMCHAR_PERFONT (128)

#defin FT_GPU_FONT_TABLE_SIZE (148)


/ * L-istruttura tat-tabella tat-tipa FT800 * /

/ * L-indirizz tat-tabella tal-fonti f'ROM jista 'jinstab billi taqra l-indirizz mill-post ta' 0xFFFFC. * /

/ * 16-il tabella b'tipa huma preżenti fl-indirizz moqri mill-post 0xFFFFC * /

typedef struct FT_Gpu_Fonts

{

/ * Il-valuri kollha huma f'bytes * /

/ * Wisa 'ta' kull tipa ta 'karattru minn 0 sa 127 * /

ft_uint8_t FontWidth [FT_GPU_NUMCHAR_PERFONT];

/ * Format tal-bitmap tal-formati bit-tipa wrt bitmap appoġġati minn FT800 - L1, L4, L8 * /

ft_uint32_t FontBitmapFormat;

/ * It-triq tal-linja tal-font fil-FT800 ROM * /

ft_uint32_t FontLineStride;

/ * Wisa 'tal-font fil-pixels * /

ft_uint32_t FontWidthInPixels;

/ * L-għoli tal-font fil-pixels * /

ft_uint32_t FontHeightInPixels;

/ * Dejta prima dwar il-grafika tat-tipa '* /

ft_uint32_t PointerToFontGraphicsData;

} FT_Gpu_Fonts_t;


#endif / * #ifndef _FT_GPU_H_ * /



/ * Xejn aktar minn dan * /